1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
\name{density}
\alias{density}
\alias{density,Raster-method}
\docType{methods}
\title{Density plot}
\description{
Create density plots of values in a Raster object
}
\usage{
\S4method{density}{Raster}(x, layer, maxpixels=100000, plot=TRUE, main, ...)
}
\arguments{
\item{x}{Raster object}
\item{layer}{numeric. Can be used to subset the layers to plot in a multilayer object (RasterBrick or RasterStack)}
\item{maxpixels}{the maximum number of (randomly sampled) cells to be used for creating the plot}
\item{plot}{if \code{TRUE} produce a plot, else return a density object}
\item{main}{main title for each plot (can be missing)}
\item{...}{Additional arguments passed to base plot}
}
\value{
density plot (and a density object, returned invisibly if \code{plot=TRUE)}
}
\examples{
logo <- stack(system.file("external/rlogo.grd", package="raster"))
density(logo)
}
\keyword{spatial}
|