I'd like to add label showing the values
of latitudinal zonal averages
to levelplot's
gray margin
. In the following example, the min
and max
values for latitudinal means
are 286
and 751
respectively. Any suggestion on adding an axis
with this information to the margin
?
library(raster)
library(rasterVis)
r <- raster(system.file("external/test.grd", package="raster"))
levelplot(r, at=seq(100, 1850, by = 250))
# calculating the latitudinal means
rows <- init(r, v='y')
yAve <- zonal(r, rows, fun='mean',na.rm=TRUE)
summary(yAve)