plotPalettes: Plot a palettes with optional labels

Description Usage Arguments Value Examples

View source: R/cultural-analytics.r

Description

Plot a list of palettes as a series of rows of coloured squares, optionally with labels rendered to the left of each palette.

Usage

1
plotPalettes(palettes, names = FALSE)

Arguments

palettes

A list of palettes.

names

A vector of labels for the palettes.

Value

None.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
palettes<-list(data.frame(red=c(0.1, 0.5, 0.9), green=c(0.4, 0.5, 0.9),
blue=c(0.7, 0.8, 0.9)),
data.frame(red=c(0.1, 0.4, 0.3), green=c(0.4, 0.5, 0.6),
blue=c(0.6, 0.8, 0.9)),
data.frame(red=c(0.1, 0.3, 0.1), green=c(0.4, 0.5, 0.1),
blue=c(0.5, 0.8, 0.1)))
paletteNames<-c("First Palette", "Second Palette", "Third Palette")
## You'll need to allow space for palette names when added
par(mar=c(4, 8, 4, 4))
plotPalettes(palettes, paletteNames)

CulturalAnalytics documentation built on May 31, 2017, 3:28 a.m.