powered by
Create density plots of the cell values of a SpatRaster
# S4 method for SpatRaster density(x, maxcells=100000, plot=TRUE, main, ...)
density plot (and a density object, returned invisibly if plot=TRUE)
plot=TRUE)
SpatRaster
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
character. Caption of plot(s)
additional arguments passed to plot
plot
logo <- rast(system.file("ex/logo.tif", package="terra")) density(logo)
Run the code above in your browser using DataLab