AU color scale
scale_color_au.RdEnables the customization of the color aesthetic using pre-defined or custom AU color palettes.
Usage
scale_color_au(
style = "light",
reverse = FALSE,
discrete = FALSE,
colors = NA,
na.value = au_colors("grey"),
...
)Arguments
- style
String, color palette style. Could be
light,dark,hotandcold,hotandcold_dark, orcustom. Default palette islight.- reverse
Boolean,
TRUEreverses the color order.- discrete
Boolean,
TRUEapplies a discrete color scale,FALSEapplies a continuous color scale. Default isFALSE.- colors
Vector of AU color names. Only used when
style = "custom"is passed in.- na.value
String or named vector, the color to use for NA values. Default is
au_colors("grey"), corresponding to#878787.- ...
Arguments passed on to
scale_color_manualorscale_color_gradientn.
Examples
ggplot2::ggplot(iris, ggplot2::aes(x = Petal.Width, y = Petal.Length, color = Species)) +
ggplot2::geom_point(size = 5, alpha = 0.3) +
ggpubr::theme_pubr() +
scale_color_au(discrete = TRUE)