R/ggplot_stuff.R
scale_fill_crayola.Rd
Crayola colour
scale_fill_crayola(n = 100, ...)
Number of repeats of the colours, default set to 100
Additional parameters to pass to scale_fill_manual.
scale_fill_manual
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")