brewer_pal

0th

Percentile

Color Brewer palette (discrete).

Color Brewer palette (discrete).

Usage
brewer_pal(type = "seq", palette = 1)
Arguments
type
One of seq (sequential), div (diverging) or qual (qualitative)
palette
If a string, will use that named palette. If a number, will index into the list of palettes of appropriate type
References

http://colorbrewer2.org

Aliases
  • brewer_pal
Examples
show_col(brewer_pal()(10))
show_col(brewer_pal("div")(5))
show_col(brewer_pal(pal = "Greens")(5))

# Can use with gradient_n to create a continous gradient
cols <- brewer_pal("div")(5)
show_col(gradient_n_pal(cols)(seq(0, 1, length = 30)))
Documentation reproduced from package scales, version 0.2.1, License: MIT

Community examples

Looks like there are no examples yet.