View source: R/lcrost-color-scales.R
scale_colour_lcrost | R Documentation |
This is a color-blind friendly, qualitative scale with eight different colors. See palette_lcrost for details. The palette was first described in this blog post.
... |
common discrete scale parameters: |
use_black |
If |
order |
Numeric vector listing the order in which the colors should be used. Default is 1:8. |
darken |
Relative amount by which the scale should be darkened (for positive values) or lightened (for negative values). |
alpha |
Alpha transparency level of the color. Default is no transparency. |
A color scale for use in plots created with ggplot2::ggplot()
.
library(ggplot2)
ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) +
geom_point() + scale_color_lcrost()
ggplot(iris, aes(Sepal.Length, fill = Species)) +
geom_density(alpha = 0.7) + scale_fill_lcrost(order = c(1, 3, 5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.