View source: R/scale_fill_crayola.R
scale_fill_crayola | R Documentation |
Crayola colour
scale_fill_crayola(n = 100, ...)
n |
Number of repeats of the colours, default set to 100 |
... |
Additional parameters to pass to |
library(ggplot2)
d <-
expand.grid(year = 2000:2010,
age = 1:10)
d$yc <- as.factor(d$year - d$age)
d$value <- rnorm(nrow(d))
ggplot(d) +
geom_bar(aes(year, value, fill = yc), stat = "identity") +
facet_grid(age ~ .) +
scale_fill_crayola() +
theme(legend.position = "none")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.