Description Usage Arguments Examples
View source: R/choose_palette_ggp.R
It generates a palette by linear interpolation for scale_color
1 | scale_color_tanagr(palette_name, discrete = TRUE, ...)
|
palette_name |
the name of the palette |
discrete |
whether to use a discrete or continuous color palette (boolean) |
... |
additional arguments to pass to scale_color_gradientn |
1 2 3 4 5 6 7 8 9 10 11 | library(ggplot2)
ggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color = Species)) +
geom_point(size = 3) +
geom_density2d() +
theme_bw(base_size=12) +
scale_color_tanagr(palette_name = "stilpnia_preciosa")
ggplot(iris, aes(x = Sepal.Width, y = Sepal.Length, color = Petal.Width)) +
geom_point(size = 4) +
theme_bw(base_size=12) +
scale_color_tanagr(palette_name = "chlorochrysa_nitidissima", discrete = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.