powered by
Create density plots of values in a Raster object
# S4 method for Raster density(x, layer, maxpixels=100000, plot=TRUE, main, ...)
density plot (and a density object, returned invisibly if plot=TRUE)
plot=TRUE)
Raster object
numeric. Can be used to subset the layers to plot in a multilayer object (RasterBrick or RasterStack)
the maximum number of (randomly sampled) cells to be used for creating the plot
if TRUE produce a plot, else return a density object
TRUE
main title for each plot (can be missing)
Additional arguments passed to base plot
logo <- stack(system.file("external/rlogo.grd", package="raster")) density(logo)
Run the code above in your browser using DataLab