selectPalette {GCDkit}R Documentation

selectPalette

Description

Picks given number of colour shades from one of the available palettes.

Usage

    selectPalette(n,colour.palette=NULL,GUI=TRUE)

Arguments

n

desired number of colours

colour.palette

one of the colour palette names, see Details

GUI

logical; is the function called from GUI?

Details

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.

selectPalette.png

Value

Returns a matrix with a single row of hexadecimal codes. Its single value of rownames represents the name of the palette selected.

Note

Note that UK spelling of "colours" in names of palettes is fixed automatically to the US "colors".

Author(s)

Vojtěch Janoušek, vojtech.janousek@geology.cz

See Also

Table of the available named plotting colours is obtained by showColours.

assignColLab assignColVar diagramWithCircles plotWithCircles filledContourFig

Examples

    selectPalette(5,"heat.colours")
    
    my.palette<-colorRampPalette(c("black", "darkgreen", "red"),space = "rgb")
    selectPalette(5,"my.palette")

[Package GCDkit version 6.1 Index]