scale_color_add_on.Rd
A wrapper around a variety of scale_color_-() / scale_fill_-()
functions.
scale_color_add_on( aes = "color", variable = "numeric", clrsp = NULL, clrp = NULL, ... )
aes | Character value. Either 'color' or 'fill'. Denotes the used aesthetic. |
---|---|
variable | The variable that is mapped onto the denoted aesthetic or a character value - one of 'numeric', 'discrete'. |
clrsp | Character value. The color spectrum of choice if (Ignored if |
clrp | Character value. The color panel of choice if (Ignored if |
... | Additional arguments given to the respective function.
|
An unnamed list containing the ggproto object.
If the specified clrp
does not contain enough colors to cover the
specified variable NULL is returned - which makes the call to ggplot2::ggplot()
use the default ggplot2 color panel.
Make sure to use correct capitalization and white spaces denoting the color panel or -spectrum of choice.
library(ggplot2)#>#>ggplot(mtcars, aes(x = qsec, y = wt)) + geom_point(aes(color = mpg)) + scale_color_add_on(aes = "color", variable = mtcars$mpg, clrsp = "Reds 3")