palette.display: Built-in Paletteknife Palettes

View source: R/pals.R

palette.displayR Documentation

Built-in Paletteknife Palettes

Description

Plot a list of palettes for comparison

Usage

palette.display(palette = palette.colorbrewer)

Arguments

palette

Character vector of palette names or a named list of colour vectors

Value

No return value (NULL)

Examples

palette.display(c(palette.misc,palette.colorbrewer,palette.viridis))

palette.display(c(list(rainbow=rainbow(10), default=palette()),
               palette.misc, palette.colorbrewer[c('Paired','Set1','Set2')] ))

palette.display(list(rainbow=rainbow(45)[30:1], turbo=palette.viridis$turbo ))

# Call by vector of names - here it gets 'Paired' from palette.colorbrewer
palette.display(palette.pals() )

# Bit of fun ordering a list of palettes (MUST be same palette size)
mat_cols = do.call(rbind, lapply(palette.colorbrewer[9:26],
                          function(hex) as.vector(rgb2hsv(col2rgb(hex)))))
palette.display(palette.colorbrewer[9:26][hclust(dist(mat_cols))$order])


paletteknife documentation built on April 20, 2022, 5:05 p.m.