View source: R/scale_fill_discrete_scs.R
scale_fill_discrete_scs | R Documentation |
Discrete colour fill scales for SCS
scale_fill_discrete_scs(palette = "main", reverse = FALSE, ...)
palette |
Name of palette to use from 'scs_colour_palettes'; e.g. main, sequential, focus. |
reverse |
Boolean value to indicate whether the palette should be reversed |
... |
Additional arguments passed to scale type |
library(ggplot2) library(dplyr) mpg %>% filter(substr(manufacturer, 1, 1) %in% c("a", "c", "f")) %>% ggplot(aes(x = manufacturer, y = cty, fill = manufacturer)) + geom_col() + scale_fill_discrete_scs()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.