Learn R Programming

seas (version 0.3-3)

image.seas.sum: 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) w
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 co
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 on
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.

See Also

seas.sum, seas.norm

See SeasOpts to modify other aspects of the plot

Examples

Run this code
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)

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)

Run the code above in your browser using DataLab