View source: R/style_scale_color.R
style_scale_color | R Documentation |
The purpose of style_scale_color is to make our own colors! This includes the "duck hunt" color palette!
style_scale_color(palette = "main", discrete = T, reverse = F, ...)
palette |
Character name of palette in cllr_palettes |
discrete |
Boolean; Is the color aesthetic discrete or not? |
reverse |
Boolean; Should the colors be reversed? |
... |
Additional arguments which can be passed to ggplot2::disrete_scale() or ggplot2::scale_color_gradientn(), used when discrete is true or false, respectively |
There are four color schemes to choose from: 1) "main" = simple colors, duckhunt; "NULL" value 2) "duckhunt" = palette from duckhunt 3) "cblind" = color blind palette 4) "gray" = gray scale if you're boring If discrete = F, will pick gradient between discrete colors
An object of class "ggproto", for use in ggplot2::ggplot
# Create a scatterplot
ggplot2::ggplot(iris, ggplot2::aes(Sepal.Width,Sepal.Length, color=Species)) +
ggplot2::geom_point(size=5) +
style_scale_color()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.