Learn R Programming

rworldmap (version 1.01)

rwmGetColours: Internal function to choose map colours for classified data

Description

Internal function to choose map colours for classified data.

Usage

rwmGetColours(colourPalette, numColours)

Arguments

colourPalette
string describing the colour palette to use, choice of:
"palette" for the current palette a vector of valid colours, e.g. =c('red','white','blue') or output from RColourBrewer

Value

  • A vector specifiying a number of colours.

item

numColours

Details

Returns a vector of colours based upon the palette specified and number of colours specified. If colourPalette specifies a number of colours and this is different from numColours, numColours takes precedence and colours are interpolated to make the number fit.

See Also

RColorBrewer

Examples

Run this code
rwmGetColours(colourPalette='topo', numColours=10)

Run the code above in your browser using DataLab