I'm using the levelplot
function in the RasterVis
package to plot one raster. I use the following code on my GeoTiff:
require(raster)
require(rasterVis)
data <- raster("mytiff.tif")
levelplot(data, layers=1, par.settings=RdBuTheme)
What, by default, do the graphs presented in the margins show? Is it the mean for each column/row or the median or a cumulative count or something else?
I can't find this in the help information, so any enlightenment would be much appreciated.
Thanks!
These graphics are the row and column summaries of the
RasterLayer
. The summary is computed with the function defined byFUN.margin
(which usesmean
as default value).Let's illustrate it with an example:
The graphics shown in the margins can be produced with the
zonal
function. Withinit
we create twoRasterLayer
with the rows and cols numbers to define the zones to be summarized.The result is the same: