plot.seas.sum {seas} | R Documentation |
Plots normalized seasonal sums using boxplots.
## S3 method for class 'seas.sum': plot(x, var, norm="days", year.filter, ylim, start=1, rep=0, col = "lightgrey", main, ylab, ...)
x |
a seas.sum object created by seas.sum |
var |
name of seasonal variable in x |
norm |
a variable to normalize by, either "days" (to
produce unit/day) or "active" (unit/day, when
active); it may also be a matrix with the same dimensions as
x$days |
year.filter |
use only these years for analysis |
ylim |
either a single value for c(0,ylim) , or a range of
c(min,max) for the y-axis limits |
start |
starting bin at left-hand side of plot |
rep |
repeat bins on right-hand side of plot |
col |
colour for boxplot, default is "lightgrey" |
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 |
This function is a boxplot interpretation of a seas.sum
object. This is not the same as treating var
as a continuous
variable and using plot.seas.var
, since a seas.sum
object has been smoothed. Daily extreme values are not well
represented here as a result.
The appearance of the boxplots are sensitive to the width
parameter specified in the seas.sum
function on strongly
discontinuous variables. Small bin widths capture the discontinuities
better than wider bins, and changes the skew of the distribution.
For instance, the median will appear to decrease as width
decreases.
M.W. Toews
seas.sum
, image.seas.sum
, seas.norm
data(mscdata) par.orig <- par(no.readonly=TRUE) on.exit(par.orig) dat <- mksub(mscdata, id=1108447) dat.ss <- seas.sum(dat) # Normalized by the number of days in each bin plot(dat.ss) # Normalized by the number of active days in each bin plot(dat.ss,norm="active") # Snow, using a different start day, and a better y-axis: dat2.ss <- seas.sum(dat,var="snow",width="mon", start.day=as.Date("2000-08-01")) par(yaxs="i") plot(dat2.ss,var="snow") plot(dat2.ss,var="snow",norm="active")