classify(x, method="equalinterval", breaks, Range=range(x, finite=TRUE), sdlab=1)
method=standarddeviation
. 1 means -0.5 sd, 0.5 sd
, 2 means -1 sd, mean, 1 sd
, 3 means actual numbers for type 1, 4 means numbers for type 2.colPoints
colPoints
.
Binning methods are explained very nicely in the link in the section References.
nbins indicates the number of classes (and thus, colors).
method
| explanation | meaning of breaks
| default
equalinterval | nbins equally spaced classes | nbins | 100
quantile | classes have equal number of values | the quantiles (or number of them) | 0:4/4
standarddeviation | normal distributions | the number of sd in one direction from the mean | 3
usergiven | custom breakpoints | personal breakpoint values (including ends of Range) | none
}
The default is set to equalinterval which makes sense for my original intent of plotting lake depth (bathymetry measured at irregularly distributed points) on a linear color scale.colPoints
classify( c(1:10, 20), breaks=12)
classify( c(1:10, 20), "q", breaks=0:10/10)
classify( c(1:10, 20), "s", sdlab=2 )
Run the code above in your browser using DataLab