scale_color_wa_d {wacolors}R Documentation

Color palettes for ggplot2

Description

Color palettes for ggplot2

Usage

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

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)


[Package wacolors version 0.3.1 Index]