brewer.pal_extended: RColorBrewer's Extended Palettes without Warning

Description Usage Arguments Value Examples

Description

Creates nice looking color palettes especially for thematic maps. This modification ColorBrewer palette extends to an infinite amount of colors. You may choose a palette inside: between c("None", "BrBG", "PiYG", "PRGn", "PuOr", "RdBu", "RdGy", "RdYlBu", "RdYlGn", "Spectral", "Accent", "Dark2", "Paired", "Pastel1", "Pastel2", "Set1", "Set2", "Set3", "Blues", "BuGn", "BuPu", "GnBu", "Greens", "Greys", "Oranges", "OrRd", "PuBu", "PuBuGn", "PuRd", "Purples", "RdPu", "Reds", "YlGn", "YlGnBu", "YlOrBr", "YlOrRd").

Usage

1

Arguments

n

Type: numeric. The number of colors you want back.

name

Type: character. The palette name you can find via brewer.pal.info when RColorBrewer is loaded in memory.

Value

A color palette in a numeric vector following the hexadecimal RGB format (#RRGGBB) ready to be used.

Examples

1
2
library(RColorBrewer)
brewer.pal_extended(20, "BrBG") # Generate a palette of 20 colors when it cannot

Laurae2/Laurae documentation built on May 8, 2019, 7:59 p.m.