Learn R Programming

seas (version 0.3-3)

plot.seas.norm: Plot seasonal normal of a variable, including precipitation normals

Description

Plots a normal of a seasonal variable, including a precipitation normal (which shows rain and snow fractions, where available). Significant missing data values are also indicated.

Usage

## S3 method for class 'seas.norm':
plot(x, start=1, rep=0, ylim,
     varwidth=FALSE, normwidth=FALSE,
     leg, add.alt=FALSE, main, ylab, \ldots)

Arguments

x
a seas.norm object created by either seas.norm or precip.norm
start
starting bin
rep
repeat bins
ylim
range of y-axis; either as a single value, c(0,max), or as two values c(min,max)
varwidth
logical; varies the width of each bar directly proportional to the frequency of active days (defined by a threshold); the value is normalized according to the next argument
normwidth
normalizes the width of the bars to a fixed numeric value (in days), or the maximum value if given TRUE; the default FALSE value normalizes each bar to the number of potentially active days
leg
if TRUE shows a legend summary of the statistics in the upper left hand corner; it can also be a c(x,y) pair or locator to manually place the legend on t
add.alt
logical; adds imperial units on the right-hand y-axis
main
title for plot; if it is missing, then it will automatically be generated
ylab
y-axis label; if it is missing, then it will automatically be generated
...
ignored

Details

The varwidth variable is useful for separating different precipitation patterns throughout the season. It changes the width of the bar proportional to the frequency of precipitation events within the bin. Ideally, the bars will be tall and narrow with intense storms that occur infrequently, such as convective storms. Conversely the bars will be broader with less-intense rainfall events occurring more frequently.

See Also

seas.norm, precip.norm, seas.sum

Examples

Run this code
data(mscdata)
dat <- mksub(mscdata, id=1108447)
d.ss <- seas.sum(dat)
plot(seas.norm(d.ss))
plot(precip.norm(d.ss,fun=median))
plot(precip.norm(d.ss,fun=mean))
plot(precip.norm(d.ss,fun=mean,norm="active"))
plot(precip.norm(d.ss,fun=median,norm="active"))
plot(precip.norm(d.ss),start=15,rep=12)
mar <- par("mar")
plot(precip.norm(d.ss),add.alt=TRUE)

par(mar=mar)
d2.ss <- seas.sum(dat,start.day=as.Date("2000-08-01"))
plot(precip.norm(d2.ss, fun="mean"))

Run the code above in your browser using DataLab