scale_colour_binary | R Documentation |
Provides exactly two colors from the viridis magma palette (red and purple)
scale_colour_binary(direction = 1, ...)
scale_color_binary(direction = 1, ...)
direction |
Order of colors, 1: purple-red. -1: red-purple, Default: 1 |
... |
Additional arguments to be passed to ggplot2::discrete_scale |
The default top level from the discrete viridis scale is bright yellow, which is too bright. This scale uses red for top level.
a colour scale to be used with ggplot2
discrete_scale
magma
## Not run:
if(interactive()){
ggplot(mtcars, aes(hp, mpg, colour=factor(am))) + geom_point() + scale_colour_binary()
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.