xterm.pal: Get predefined colour palettes

Description Usage Value Author(s) See Also Examples

View source: R/colors.r

Description

All except "GnRd" and "long" are basen on the color brewer palettes, see brewer.pal of the RColorBrewer package.

Usage

1
2
3
4
5

Value

A list of vectors with colour indices.

Author(s)

Christofer B<c3><a4>cklin

See Also

display.xterm.pal, display.xterm.colors

Examples

1
2
3
4
5
6
7
8
9
display.xterm.pal()
pal <- xterm.pal()$Accent

freqs <- runif(6)
fruits <- factor(sample(6, size=30, replace=TRUE, freqs/sum(freqs)),
                 labels=c("apple", "grapes", "banana", "lemon",
                          "blueberry", "raspberry"))
for(i in 1:length(fruits))
    cat(style(fruits[i], "\n", fg=pal[fruits[i]]))

backlin/xtermStyle documentation built on June 4, 2017, 12:12 a.m.