selectPalette {GCDkit} | R Documentation |
Picks given number of colour shades from one of the available palettes.
selectPalette(n,colour.palette=NULL,GUI=TRUE)
n |
desired number of colours |
colour.palette |
one of the colour palette names, see Details |
GUI |
logical; is the function called from GUI? |
The desired number of colours has to be given in any case.
The possible palettes are: 'grays','reds','blues','greens','cyans','violets','yellows'
,
'cm.colors','heat.colors','terrain.colors','topo.colors','rainbow'
and 'jet.colors'
.
Also, user-defined palette functions are supported. See Examples.
If not specified upon function call, the colour palette can be picked from
list of available ones. Optionally (if GUI = TRUE
) a chart with their preview is shown.
Returns a matrix with a single row of hexadecimal codes. Its single value of rownames
represents the name of the palette selected.
Note that UK spelling of "colours" in names of palettes is fixed automatically to the US "colors".
Vojtěch Janoušek, vojtech.janousek@geology.cz
Table of the available named plotting colours is obtained by showColours
.
assignColLab assignColVar diagramWithCircles plotWithCircles filledContourFig
selectPalette(5,"heat.colours") my.palette<-colorRampPalette(c("black", "darkgreen", "red"),space = "rgb") selectPalette(5,"my.palette")