AU fill scale
scale_fill_au.Rd
Enables the customization of the fill aesthetic using pre-defined or custom AU color palettes.
Usage
scale_fill_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,
TRUE
reverses the color order.- discrete
Boolean,
TRUE
applies a discrete color scale,FALSE
applies 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_fill_manual
orscale_fill_gradientn
.
Examples
iris_df = dplyr::summarize(dplyr::group_by(iris, Species),
`Mean petal width` = mean(Petal.Width))
ggplot2::ggplot(iris_df, ggplot2::aes(x = Species,
y = `Mean petal width`, fill = Species)) +
ggplot2::geom_bar(stat = "identity") +
ggpubr::theme_pubr() +
scale_fill_au(discrete = TRUE, style = "light")