scale_wa: Color palettes for 'ggplot2'

Description Usage Arguments Value Examples

Description

Color palettes for 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
24
25
26
27
28
29
30
31
32
33
34
35
scale_color_wa_d(palette = "rainier", which = NULL, ..., reverse = FALSE)

scale_fill_wa_d(palette = "rainier", which = NULL, ..., reverse = FALSE)

scale_color_wa_c(
  palette = "sound_sunset",
  which = NULL,
  midpoint = NULL,
  ...,
  reverse = FALSE
)

scale_fill_wa_c(
  palette = "sound_sunset",
  which = NULL,
  midpoint = NULL,
  ...,
  reverse = FALSE
)

scale_color_wa_b(palette = "sound_sunset", which = NULL, ..., reverse = FALSE)

scale_fill_wa_b(palette = "sound_sunset", which = NULL, ..., reverse = FALSE)

scale_colour_wa_d(palette = "rainier", which = NULL, ..., reverse = FALSE)

scale_colour_wa_c(
  palette = "sound_sunset",
  which = NULL,
  midpoint = NULL,
  ...,
  reverse = FALSE
)

scale_colour_wa_b(palette = "sound_sunset", which = NULL, ..., reverse = FALSE)

Arguments

palette

a wacolors palette or palette name.

which

if not NULL, the indices or names of a subset of colors to use.

...

Other arguments passed on to ggplot2::discrete_scale(), ggplot2::continuous_scale(), or ggplot2::binned_scale() to control name, limits, breaks, labels and so forth.

reverse

TRUE if the colors should be reversed.

midpoint

if not NULL and at least one limit is not provided, the value to center the scale at. Useful for diverging scales.

Value

A ggplot2::Scale object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(ggplot2)

ggplot(mtcars, aes(mpg, wt)) +
    geom_point(aes(color = factor(cyl), size=hp)) +
    scale_color_wa_d()

ggplot(mtcars, aes(mpg, wt)) +
    geom_point(aes(color = hp)) +
    scale_color_wa_c("palouse",  which=c("snake", "wheat"))

ggplot(diamonds) +
    geom_bar(aes(x = cut, fill = clarity)) +
    scale_fill_wa_d(wacolors$sound_sunset, reverse=TRUE)

wacolors documentation built on May 17, 2021, 9:08 a.m.