choose.colors {NCStats}R Documentation

Allows user to create a list of colors from among a variety of color palettes.

Description

Allows user to create a list of colors from among a variety of color palettes.

Usage

choose.colors(pal=palette.choices(),num,...)

Arguments

pal A character that is the name of a palette. See details.
num The number of colors to be returned.
... Other arguments to the various palette functions.

Details

The pal argument must be one of “rich”, “cm”, “default”, “grey”, “gray”, “heat”, “jet”, “rainbow”, “topo”, or “terrain”.

Value

A vector of colors of length num.

Author(s)

Derek H. Ogle, dogle@northland.edu.

See Also

rich.colors in gplots, cm.colors, heat.colors, topo.colors, terrain.colors, rainbow, colorRampPalette, and colors.

Examples

n <- 20
# Color Wheels
pie(rep(1,n), col=choose.colors("rich",n))
pie(rep(1,n), col=choose.colors("rainbow",n))
pie(rep(1,n), col=choose.colors("topo",n))
pie(rep(1,n), col=choose.colors("gray",n))
pie(rep(1,n), col=choose.colors("jet",n))

[Package NCStats version 0.0-12 Index]