Description Usage Arguments Functions Examples
Title Add IFS colours to a ggplot
A wrapper for scale_colour_manual
/ scale_fill_manual
that allows the user to specify a
certain colour palette, or ask for specific IFS colours.
1 2 3 | scale_colour_ifs(palette = "default", values = NA, gradient = FALSE, ...)
scale_fill_ifs(palette = "default", values = NA, gradient = FALSE, ...)
|
palette |
The default option are the IFS mid-colours. Accepted values are |
values |
For manually entering colour values. The allowed values are |
gradient |
If true, acts as a wrapper for |
... |
Other values to pass to |
scale_fill_ifs
: Equivalent wrapper for scale_fill_manual
1 2 3 4 5 6 7 8 9 10 11 | ggplot(iris, aes(x = Sepal.Width, y = Sepal.Length, colour = Species)) +
geom_point() +
scale_colour_ifs()
ggplot(iris, aes(x = Sepal.Width, y= Sepal.Length, colour = Species)) +
geom_point() +
scale_colour_ifs(values = c("dark_green_2", "mid_red", "light_yellow_3"))
ggplot(iris, aes(x = Sepal.Width, y = Sepal.Length, colour = Petal.Length)) +
geom_point() +
scale_colour_ifs(palette = "greys", gradient = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.