Create Colour Scheme for a Range of Numbers
Given a range of numerical values, this command creates a colour scheme that would be appropriate if the numbers were altitudes (elevation above or below sea level).
beachcolours(range, sealevel = 0, monochrome = FALSE, ncolours = if (monochrome) 16 else 64, nbeach = 1) beachcolourmap(range, ...)
- Range of numerical values to be mapped. A numeric vector of length 2.
- Value that should be treated as zero.
A single number,
- Logical. If
TRUEthen a greyscale colour map is constructed.
- Number of distinct colours to use.
- Number of colours that will be yellow.
- Arguments passed to
Given a range of numerical values, these commands create a colour scheme that would be appropriate if the numbers were altitudes (elevation above or below sea level).
Numerical values close to zero are portrayed in green (representing the waterline). Negative values are blue (representing water) and positive values are yellow to red (representing land). At least, these are the colours of land and sea in Western Australia. This colour scheme was proposed by Baddeley et al (2005).
beachcolours returns these colours
as a character vector, while
returns a colourmap object.
range should be a numeric vector of
length 2 giving a range of numerical values.
sealevel specifies the height value that will
be treated as zero, and mapped to the colour green.
A vector of
ncolours colours will be created,
nbeach colours will be green.
monochrome is included
for convenience when preparing publications.
monochrome=TRUE the colour map will be
a simple grey scale containing
shades from black to white.
beachcolours, a character vector of length
ncoloursspecifying colour values. For
beachcolourmap, a colour map (object of class
Baddeley, A., Turner, R.,