Description Usage Arguments Details Value Examples
These functions provide the option to use State of Minnesota continuous palette colors with ggplot2.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | scale_color_mn_c(
diverge = FALSE,
high_color = "minnesota_blue",
low_color = "minnesota_green",
color_range = 0.75,
...
)
scale_colour_mn_c(
diverge = FALSE,
high_color = "minnesota_blue",
low_color = "minnesota_green",
color_range = 0.75,
...
)
scale_fill_mn_c(
diverge = FALSE,
high_color = "minnesota_blue",
low_color = "minnesota_green",
color_range = 0.75,
...
)
|
diverge |
logical value to indicate whether color values should diverge. Defaults to FALSE. |
high_color |
character color name or index value for high values. Defaults to "minnesota_blue". See 'show_palette_mn' for all names. |
low_color |
character color name or index value for low values. Defaults to "minnesota_green". |
color_range |
numeric specifying the amount of lightening. Negative numbers cause darkening. Defaults to 0.75. |
... |
Arguments to pass on to 'ggplot2::scale_color_gradient' (non-diverging) or 'ggplot2::scale_color_gradient2' (diverging) |
Available State of Minnesota color names are available in the 'show_palette_mn' function.
A 'ScaleContinous' object that can be added to a 'ggplot' object
1 2 3 4 5 | if (require("ggplot2")) {
ggplot(mtcars, aes(x = mpg, y = hp, color = wt)) +
geom_point(size = 4) +
scale_color_mn_c()
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.