A gradient with two poles around a neutral color. The neutral color always
lands on midpoint, however lopsided the data.
Usage
scale_fill_maison_div(
palette = "diverging",
midpoint = 0,
reverse = FALSE,
...
)
scale_colour_maison_div(
palette = "diverging",
midpoint = 0,
reverse = FALSE,
...
)
scale_color_maison_div(
palette = "diverging",
midpoint = 0,
reverse = FALSE,
...
)Arguments
- palette
"diverging","diverging_green"or"quiet".- midpoint
The data value drawn in the neutral color.
- reverse
TRUEswaps the poles.- ...
Passed to
ggplot2::scale_fill_gradientn()orggplot2::scale_colour_gradientn().
Details
| Palette | Poles | Use |
"diverging" | charcoal and red, around warm_white | the default |
"diverging_green" | plum and green | when the high end is good news |
"quiet" | muted purple and muted sage, around a light gray | no good or bad direction, such as "prefer A" against "prefer B" |
Examples
library(ggplot2)
df <- expand.grid(x = 1:6, y = 1:4)
df$change <- seq(-10, 30, length.out = nrow(df))
ggplot(df, aes(x, y, fill = change)) +
geom_tile() +
scale_fill_maison_div("diverging_green") +
theme_maison(base_family = "sans", grid = "")