assignColVar {GCDkit} | R Documentation |
Assigns plotting colours according to the values of the variable.
assignColVar(what=NULL,pal="heat.colours",save=TRUE,n=15)
what |
variable name or a formula; if NULL a dialogue is displayed |
pal |
palette |
save |
should the newly picked colours be assigned to ' |
n |
Desired approximate number of colours to be assigned. |
For selection of the variable is employed the function 'selectColumnLabel
'.
The user can specify either existing data column in the 'WR
' or a formula.
The colours can be optionally (default behaviour) assigned globally, so that all the plots
will use these from this point on.
If not specified upon function call, the palette is picked using selectPalette
.
The possible values are:
'grays','reds','blues','greens','cyans','violets','yellows','cm.colors'
,
'heat.colors', 'terrain.colors','topo.colors', 'rainbow'
and 'jet.colors'
.
The analyses with no data available for the colours assignment will remain black.
A list of two components, col
and leg
. The former are the plotting colours,
the latter information to build a legend.
If save = TRUE
, 'labels$Colour
' will acquire the codes of
desired plotting colours.
Vojtech Janousek, vojtech.janousek@geology.cz
Colours by a single variable can be assigned by assignColLab
,
symbols and colours by groups simultaneously by assignSymbGroup
.
Uniform colours are obtained by assign1col
.
Table of available plotting colours is obtained by showColours
.
assignColVar("Na2O/K2O","greens") plotDiagram("PeceTaylor",F,F)