Sequential (_c) and diverging (_div) counterparts of the discrete
scale_color_dMod2(). The diverging scales map mid to white, also for
asymmetric limits.
Usage
scale_color_dMod2_c(..., direction = 1, palette = "okabe")
scale_fill_dMod2_c(..., direction = 1, palette = "okabe")
scale_color_dMod2_div(mid = 0, ..., direction = 1, palette = "okabe")
scale_fill_dMod2_div(mid = 0, ..., direction = 1, palette = "okabe")Arguments
- ...
Arguments passed to
ggplot2::scale_color_gradientn()orggplot2::scale_fill_gradientn().- direction
1 (default) or -1; -1 reverses the ramp.
- palette
Name of a sequential palette for
_c, a diverging one for_div, seedMod2_palettes(). Defaults to the colorblind-safe"okabe".- mid
Numeric, the value mapped to white. Defaults to 0.
Examples
library(ggplot2)
d <- expand.grid(time = seq(0, 10, 0.1), eps = seq(0, 1, 0.1))
ggplot(d, aes(time, exp(-eps * time), group = eps, color = eps)) +
geom_line() + theme_dMod2() + scale_color_dMod2_c()