plot.sealevel {oce} | R Documentation |
Plot a summary diagram for sealevel data.
## S3 method for class 'sealevel': plot(x, which=1:4, adorn=NULL, draw.time.range=getOption("oce.draw.time.range"), mgp=getOption("oce.mgp"), mar=c(mgp[1],mgp[1]+1,1,1+par("cex")), margins.as.image=FALSE, ...)
x |
an object of class "sealevel" , e.g. as read by
read.sealevel . |
which |
numerical vector indicating desired plot types.
The value which =1 gives a time-series of sealevel for the
entire data set, which =2 gives sealevel for just the first 28
days, which =3 gives a power spectrum of sea level, and
which =4 gives a cumulative time integral of that spectrum. |
adorn |
vector of expressions to be executed for the panels in turn, e.g. to adorn the plots. If the number matches the number of panels, then the strings are applied to the appropriate panels, as they are drawn from top-left to bottom-right. If only a single expression is provided, it is used for all panels. (See “Examples”.) |
draw.time.range |
boolean that applies to panels with time as the horizontal axis, indicating whether to draw the time range in the top-left margin of the plot. |
mgp |
3-element numerical vector to use for par(mgp) , and
also for par(mar) , computed from this. The default is
tighter than the R default, in order to use more space for the data
and less for the axes. |
mar |
value to be used with par("mar") . |
margins.as.image |
boolean, TRUE to put a wide margin to the
right of time-series plots, matching the space used up by a palette
in an imagep plot. |
... |
optional arguments passed to plotting functions. |
Creates a plot for a sea-level dataset, in one of two varieties.
Depending on the length of which
, either a single-panel or
multi-panel plot is drawn. If there is just one panel, then the
value of par
used in plot.sealevel
is retained upon
exit, making it convenient to add to the plot. For multi-panel
plots, par
is returned to the value it had before the call,
and so adorn
must be used to add to individual panels.
None.
Dan Kelley
The example refers to Hurricane Juan, which caused a great deal of damage to Halifax in 2003. Since this was in the era of the digital photo, a casual web search will uncover some spectacular images of damage, from both wind and storm surge. The wikipedia entry http://en.wikipedia.org/wiki/Hurricane_Juan provides a good entry to the topic, with the Canadian Hurricane Centre's http://www.atl.ec.gc.ca/weather/hurricane/juan/summary_e.html filling in some more technical details.
summary.sealevel
summarizes the information, while
read.sealevel
scans it from a file.
library(oce) data(sealevel.hal) # Overall plot plot(sealevel.hal) # Illustrate storm surge during Hurricane Juan plot(sealevel.hal,which=1,xlim=as.POSIXct(c("2003-09-24","2003-10-05"), tz="UTC")) abline(v=as.POSIXct("2003-09-29 04:00:00", tz="UTC"), col="red") mtext("Hurricane\nJuan", at=as.POSIXct("2003-09-29 04:00:00", tz="UTC"), col="red")