| choose.colors {NCStats} | R Documentation |
Allows user to create a list of colors from among a variety of color palettes.
choose.colors(pal=palette.choices(),num,...)
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. |
The pal argument must be one of “rich”, “cm”, “default”, “grey”, “gray”, “heat”, “jet”, “rainbow”, “topo”, or “terrain”.
A vector of colors of length num.
Derek H. Ogle, dogle@northland.edu.
rich.colors in gplots, cm.colors, heat.colors, topo.colors, terrain.colors, rainbow, colorRampPalette, and colors.
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))