scale_continuous: Continuous scales to use for ggplot2

Description Usage Arguments Details Value Examples

Description

These functions provide the option to use State of Minnesota continuous palette colors with ggplot2.

Usage

 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,
  ...
)

Arguments

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)

Details

Available State of Minnesota color names are available in the 'show_palette_mn' function.

Value

A 'ScaleContinous' object that can be added to a 'ggplot' object

Examples

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()
}

jfangmeier/mnbrand documentation built on Jan. 25, 2022, 6:35 p.m.