Learn R Programming

raster (version 1.8-3)

boxplot: Box plot of Raster objects

Description

Box plot of layers in a Raster object

Usage

boxplot(x, ...)

Arguments

x
Raster* object
...
Additional arguments. See Methods

Methods

boxplot(x, maxpixels=100000, ...) rll{ maxpixels Integer. Number of pixels to sample from each layer of large Raster objects ... Argument passed to graphics::boxplot }

See Also

pairs, hist

Examples

Run this code
r1 <- r2 <- r3 <- raster(ncol=10, nrow=10)
r1[] <- rnorm(ncell(r1), 100, 40)
r2[] <- rnorm(ncell(r1), 80, 10)
r3[] <- rnorm(ncell(r1), 120, 30)
s <- stack(r1, r2, r3)
layerNames(s) <- c('A', 'B', 'C')

boxplot(s, notch=TRUE, col=c('red', 'blue', 'orange'), main='Box plot', ylab='random  numbers' )

Run the code above in your browser using DataLab