plot.sealevel {oce}R Documentation

Plot sealevel data

Description

Plot a summary diagram for sealevel data.

Usage

## S4 method for signature 'sealevel'
plot(x, which=1:3, adorn=NULL,
drawTimeRange=getOption("oceDrawTimeRange"),
mgp=getOption("oceMgp"), 
mar=c(mgp[1]+0.5,mgp[1]+1.5,mgp[2]+1,mgp[2]+3/4),
marginsAsImage=FALSE,
debug=getOption("oceDebug"),
...)

Arguments

x

an object of class "sealevel", e.g. as read by read.sealevel.

which

a numerical or string vector indicating desired plot types, with possibilities 1 or "all" for a time-series of all the data, 2 or "month" for a time-series of just the first month, 3 or "spectrum" for a power spectrum (truncated to frequencies below 0.1 cycles per hour, or 4 or "cumulativespectrum" for a cumulative integral of the power 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”.)

drawTimeRange

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").

marginsAsImage

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.

debug

a flag that turns on debugging, if it exceeds 0.

...

optional arguments passed to plotting functions.

Details

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.

Value

None.

Author(s)

Dan Kelley

References

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. A map of the path of Hurricane Juan across Nova Scotia is at http://ec.gc.ca/ouragans-hurricanes/default.asp?lang=En&n=222F51F7-1 (link checked April 15, 2015). Landfall, very near the site of this sealevel gauge, was between 00:10 and 00:20 Halifax local time on Monday, Sept 29, 2003.

See Also

The documentation for sealevel-class explains the structure of sealevel objects, and also outlines the other functions dealing with them.

Examples

library(oce)
data(sealevel)
## local Halifax time is UTC + 4h; see [2] on timing
juan <- as.POSIXct("2003-09-29 00:15:00", tz="UTC")+4*3600
plot(sealevel, which=1, xlim=juan+86400*c(-7,7))
abline(v=juan, col='red')

[Package oce version 0.9-18 Index]