breaks.grid: Define breakpoints for colour scales

Description Usage Arguments Value Author(s) See Also Examples

Description

This function can be used to define breakpoints for use with the functions draw.grid and legend.grid

Usage

1
breaks.grid(grd, quantile = 0.975, ncol = 12, zero = TRUE)

Arguments

grd

an array produced by make.grid or a list produced by make.multigrid or a vector of positive values.

quantile

the maximum value of the breaks will be determined by the quantile given here. This can be used to deal with outlying values in grd. If quantile = 1 then the maximum value of the breaks will be the same as the maximum value in grd.

ncol

number of colours to be used, always one more than the number of breakpoints. Defaults to 12.

zero

logical, should zero be included as a separate category? Defaults to TRUE.

Value

a vector of breakpoints to be used by draw.grid and legend.grid

Author(s)

Hans Gerritsen

See Also

draw.grid, legend.grid

Examples

1
2
3
4
5
breaks.grid(100,ncol=6)
breaks.grid(100,ncol=5,zero=FALSE)

# create breaks on the log scale
exp(breaks.grid(log(10000),ncol=4,zero=FALSE))

mapplots documentation built on May 2, 2019, 9:15 a.m.