selectPalette {GCDkit} | R Documentation |
Picks given number of colours 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 now. See Examples.
If not specified upon function call, the colour palette can be picked from
list of available ones. Optionally (if GUI = TRUE
) it plots a chart with their preview.
Returns a matrix with a single row of hexadecimal codes. Its rownames
represent the name
of the palette selected.
Note that UK spelling of "colours" in names of palettes is fixed automatically to the US "colors".
Vojtech Janousek, vojtech.janousek@geology.cz
Colours by label can be assigned by assignColLab
,
colours by variable using assignColVar
.
Uniform colours are obtained by assign1col
.
Table of available plotting colours is obtained by showColours
.
ee<-selectPalette(5,"heat.colours") ee<-selectPalette(5) ee<-selectPalette(5,GUI=FALSE) my.palette<-colorRampPalette(c("black", "darkgreen", "red"),space = "rgb") ee<-selectPalette(5,"my.palette")