
Last chance! 50% off unlimited learning
Sale ends in
maxpixels
is used.## S3 method for class 'RasterLayer':
barplot(height, maxpixels=1000000, digits=0, breaks=NULL, col=rainbow, ...)
round
the values before tabulating. Set to NULL
or to a large number if you do not want any roundingcut
rainbow
, or a vector of colorsbarplot
beside = TRUE
) of the coordinates of the bar midpoints, useful for adding to the graph. See barplot
hist, boxplot
f <- system.file("external/test.grd", package="raster")
r <- raster(f)
barplot(r, digits=-2, las=2, ylab='Frequency')
op <- par(no.readonly = TRUE)
par(mai = c(1, 2, .5, .5))
barplot(r, breaks=10, col=c('red', 'blue'), horiz=TRUE, digits=NULL, las=1)
par(op)
Run the code above in your browser using DataLab