That layout is not implemented in the rasterVis::hovmoller
method. Only the common arrangement (time on the y-axis and
latitude/longitude on the x-axis) is available at the moment.
You can try a workaround using the most important parts of the
function code.
For your example, you have to create a RasterLayer
with the latitude
values. This RasterLayer
is used by zonal
to aggregate your
RasterStack
:
library('raster')
dirLayer <- init(SISmm, v='y')
z <- zonal(SISmm, dirLayer, FUN='mean', digits=2)
The result is a matrix which is converted to a data.frame
to be
displayed with lattice::levelplot
.
## Time on the x-axis, latitude on the y-axis
dat <- expand.grid(y=z[,1], x=idx)
dat$z <- as.vector(z[,-1], mode='numeric')
levelplot(z ~ x*y, data=dat,
xlab='Time', ylab='Latitude',
panel=panel.levelplot.raster,
interpolate=TRUE,
par.settings=RdBuTheme())