Description Usage Arguments See Also Examples
This function specifies a palette, whether the palette is being applied based on a discrete or numeric variable, whether to reverse the palette colors, and additional arguments to pass to the relevant ggplot2 function (which differs for discrete or numeric mapping).
1 2 | scale_fill_orange(palette = "main", discrete = TRUE, reverse = FALSE,
na_value = "grey50", ...)
|
palette |
Character name of a palette. One of "main", "secondary", "grey", "blue", "green", "pink", "purple" or "yellow". |
discrete |
Boolean indicating whether color aesthetic is discrete or not. |
reverse |
Boolean indicating whether the palette should be reversed. |
na_value |
Character name of a color for NA values. |
... |
Additional arguments passed to discrete_scale() or scale_fill_gradientn(), used respectively when discrete is TRUE or FALSE. |
orange_colors
, orange_palettes
,
scale_color_orange
1 2 3 4 5 6 7 8 9 10 11 12 | library("ggplot2")
ggplot(mpg, aes(x = fl, y = displ, fill = fl)) +
geom_boxplot() +
scale_fill_orange(palette = "secondary", guide = "none") +
theme_minimal()
ggplot(mpg, aes(x = manufacturer, fill = manufacturer)) +
geom_bar() +
scale_fill_orange(palette = "main", guide = "none") +
theme_minimal() +
theme(axis.text.x = element_text(angle = 45, hjust = 1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.