Description Usage Arguments Details Author(s) References See Also Examples
Hovmoller plots of Raster objects.
1 2 3 4 5 | ## S4 method for signature 'RasterStackBrick'
hovmoller(object, dirXY=y, FUN=mean,
digits=2, xlab='Direction', ylab='Time',
par.settings=rasterTheme(), xscale.components=xscale.raster,
add.contour=FALSE, labels=FALSE, region=TRUE, ...)
|
object |
A RasterStackBrick with a non-empty |
dirXY |
A direction as a function of the coordinates (see
|
FUN |
A function to be applied to the zones calculated with
|
digits |
An integer, number of digits for |
xlab, ylab |
Labels of the axis. |
par.settings |
Customization of lattice. See
|
xscale.components |
See |
labels, region |
Customization of |
add.contour |
Logical, if TRUE a contourplot with filled regions is drawn. |
... |
Additional arguments for the |
Extracted from wikipedia: "A Hovmöller diagram is a
commonly used way of plotting meteorological data to highlight the role
of waves. The axes of a Hovmöller diagram are typically longitude or
latitude (abscissa or x-axis) and time (ordinate or y-axis) with the
value of some field represented through color or shading."
The direction defined by dirXY
and the function FUN
allows
for a variety of diagrams with this method.
Oscar Perpiñán Lamigueiro
Hovmoller, E. 1949. The trough and ridge diagram. Tellus 1, 62–66.
http://www.mmm.ucar.edu/episodes/Hovmoller/noJS/hovm200707.htm
http://www.star.nesdis.noaa.gov/sod/sst/squam/L4/l4_delsst_hovmoller.htm
levelplot
,
zonal
, panel.2dsmoother
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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | ## Not run:
##Solar irradiation data from CMSAF
##Data available from http://www.box.net/shared/rl51y1t9sldxk54ogd44
old <- getwd()
##change to your folder...
setwd('CMSAF')
listFich <- dir(pattern='2008')
stackSIS <- stack(listFich)
stackSIS <- stackSIS*24 ##from irradiance (W/m2) to irradiation Wh/m2
setwd(old)
idx <- seq(as.Date('2008-01-15'), as.Date('2008-12-15'), 'month')
SISmm <- setZ(stackSIS, idx)
names(SISmm) <- month.abb
## Latitude as default
hovmoller(SISmm, xlab='Latitude')
## With contour lines and labels
hovmoller(SISmm, labels=TRUE, add.contour=TRUE,
xlab='Latitude')
## Smooth color regions with latticeExtra::panel.2dsmoother
hovmoller(SISmm, panel=panel.2dsmoother, n=1000,
labels=FALSE, add.contour=TRUE,
xlab='Latitude')
## Using a function of coordinates
hovmoller(SISmm, dirXY=sqrt(x^2+y^2))
## End(Not run)
## Not run:
library(zoo)
url <- "ftp://ftp.wiley.com/public/sci_tech_med/spatio_temporal_data/"
sst.dat = read.table(paste(url, "SST011970_032003.dat", sep=''), header = FALSE)
sst.ll = read.table(paste(url, "SSTlonlat.dat", sep=''), header = FALSE)
spSST <- SpatialPointsDataFrame(sst.ll, sst.dat)
gridded(spSST) <- TRUE
proj4string(spSST) = "+proj=longlat +datum=WGS84"
SST <- brick(spSST)
idx <- seq(as.Date('1970-01-01'), as.Date('2003-03-01'), by='month')
idx <- as.yearmon(idx)
SST <- setZ(SST, idx)
names(SST) <- as.character(idx)
hovmoller(SST, panel=panel.levelplot.raster,
xscale.components=xscale.raster.subticks,
interpolate=TRUE, par.settings=RdBuTheme)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.