selectPalette {GCDkit}R Documentation

selectPalette

Description

Picks given number of colours 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'.

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. selectPalette.png

Value

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

Author(s)

Vojtech Janousek, vojtech.janousek@geology.cz

See Also

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.

Examples

    ee<-selectPalette(5,"heat.colours")
    ee<-selectPalette(5)
    ee<-selectPalette(5,GUI=FALSE)

[Package GCDkit version 4.1 Index]