View source: R/jecs_colour_scale.R
scale_colour_jecs | R Documentation |
Colour scale constructor for Jecs colours
scale_colour_jecs(palette = "jecs", discrete = TRUE, reverse = FALSE, ...)
palette |
Character name of palette in jecs_palettes |
discrete |
Boolean indicating whether colour aesthetic is discrete or not |
reverse |
Boolean indicating whether the palette should be reversed |
... |
Additional arguments passed to discrete_scale() or scale_color_gradientn(), used respectively when discrete is TRUE or FALSE |
## Not run:
library(ggplot2)
# Colour by discrete variable using default palette
ggplot(iris, aes(Sepal.Width, Sepal.Length, colour = Species)) +
geom_point(size = 4) +
scale_colour_jecs()
# Colour by numeric variable with cool palette
ggplot(iris, aes(Sepal.Width, Sepal.Length, colour = Sepal.Length)) +
geom_point(size = 4, alpha = .6) +
scale_colour_jecs(discrete = FALSE, palette = 'mj')
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.