
Plotting with openair palettes in ggplot2
scale_opencolours_c.RdThis is a convenient wrapper around ggplot2::scale_color_gradientn() and
openair::openColours() which creates colour gradients for ggopenair
plots, with helpful defaults.
Usage
scale_opencolours_c(
colours = "default",
na_value = "grey50",
aes = c("colour", "fill"),
...
)Arguments
- colours
The openair colour scheme to use. See
openair::openColours()for more information.- na_value
The aesthetic value to use for missing (NA) values. Defaults to "grey50".
- aes
Character string or vector of character strings listing the name(s) of the aesthetic(s) that this scale works with. The default,
c("colour", "fill"), applies colours to both thecolourandfillaesthetics.- ...
Other arguments to pass to
ggplot2::scale_color_gradientn().
Value
A ggproto object defining a continuous colour scale for use with
ggplot2::ggplot().
Examples
if (FALSE) {
polar_plot(mydata, "nox") + scale_opencolours()
}