image.seas.sum {seas}R Documentation

Show a seasonal sum data object

Description

Graphically display a seasonal sum object, as well as the method of solution of the median/quantile “normal”

Usage

## S3 method for class 'seas.sum':
image(x, var, norm = "days", start=1, rep=0, zlim, alim,
    palette = colorRampPalette(c("white","blue"))(64),
    year.filter, power, contour=TRUE, show.median,
    main, ...)

Arguments

x a seas.sum object
var the desired variable to show, otherwise will use the prime variable, defined in x
norm variable to normalize by, usually "days", to produce unit/day
start starting bin number; e.g., for monthly sums, if start=5, the plot will start on "May" at the left-hand side; show.median cannot be produced if start is greater than one, since the annual sums (row-wise) would be a mix of different annums
rep repetition of the bins (columns)
zlim range of normalized values displayed; this can be either a single number for the maximum (minimum set to zero), or a c(min,max) range with a defined minimum
alim if show.median, this is the range for the annual sums; this can either be a singe number for the maximum (minimum set to zero, or a c(min,max) range with a defined minimum
palette colours for image; the use of colorRampPalette is recommended
year.filter specifies the annual seasons to display
power this transforms the normalized values for the colours to a power (^), such as 0.5 for square-root (sqrt), or others; this can help improve the contrast in the display of data, but the quantities displayed in the colour-bar and contours remain untransformed
contour logical; show contours in lower left-hand plot
show.median logical; show how the median calculation is achieved graphically (computationally it is done using a secant method); see seas.norm for more information on this method; this can only be shown if the annums (rows) are complete, so start must be 1, and rep must be 0 (otherwise the row-wise sums would not be the annual sums)
main main title for plot, otherwise it will automatically be generated; NA suppresses a title, and automatically adjusts the device margins
... ignored

Details

This is a graphical representation of a seas.sum object, and is far more informative than a traditional precipitation “normal” (i.e., precip.norm or precip.norm)

If norm = "days" and show.median = TRUE (default), the seasonal sums appear in right-hand frames. Horizontal and vertical lines indicate a ‘normal’ from the image, whereby the sum of the quantile is equal to the median of the annual amount. This numerical solution is found using seas.norm.

Author(s)

M.W. Toews

See Also

seas.sum, seas.norm

See SeasOpts to modify other aspects of the plot

Examples

data(mscdata)
dat <- mksub(mscdata, id=1108447)

dat.ss <- seas.sum(dat, width="mon")
image(dat.ss)

image(dat.ss,contour=FALSE)

image(dat.ss,norm="active",start=6,rep=5)

# different start day (not Jan 1st)
dat2.ss <- seas.sum(dat,start.day=as.Date("2001-08-01"))
image(dat2.ss)
image(dat2.ss,power=2)
image(dat2.ss,palette=rainbow(64),main=NA) # no title
image(dat2.ss,palette=colorRampPalette(c("white","darkgreen"))(16))
image(dat2.ss,"snow")
image(dat2.ss,"snow",power=0.5)

# growing degree days for 10 degC
dat$gdd10 <- dat$t_mean - 10
dat$gdd10[dat$gdd10<0] <- 0
attr(dat$gdd10,"long.name") <- "growing degree days"
dat3.ss <- seas.sum(dat,var="gdd10")
image(dat3.ss,"gdd10",palette=colorRampPalette(c("white","red"))(64))

[Package seas version 0.3-8 Index]