Learn R Programming

seas (version 0.2-1)

plot.seas.var: Plot seasonal normals of a given variable

Description

Plot seasonal normals using boxplots of a given variable.

Usage

plot.seas.var(x, var)

plot.seas.var(x, start, end, width=11, var, 
  col = "lightgrey", id, ylab, ylim, add.alt, logy=FALSE,...)

Arguments

x
a data.frame
start
start year; if omitted minimum year will be used
end
end year; if omitted will use same as start, and if start is omitted, will use maximum year
width
size of bin; see mkfact
var
a variable; a column name in x
col
colour for the boxplots; default is "lightgrey"
id
unique station identifier used to extract a subset of data from x
ylab
label for the y-axis; if there is an alternative y-axis, this can have a length of two for the second label
ylim
c(min,max) range for y-axis
add.alt
this adds an alternative axis, and is specified by c(slope,inter); for example, if the primary measure is in degrees C, a secondary scale in K would be c(1, 273.15), or in degrees F would be c(5/9, 32)
logy
logical; makes a log y-scale
...
other arguments passed to .seastitle for title style, and other customizations to the appearance

Value

  • Returns values from boxplot statistics on the variable.

synopsis

plot.seas.var(x, start, end, width=11, var, col = "lightgrey", id, ylab, ylim, add.alt, logy=FALSE,...)

Details

Shows normals of a seasonal variable using boxplots.

See Also

plot.seas.norm, plot.year

Examples

Run this code
data(mscdata)

plot.seas.var(mscdata, var="max_t", col="tomato", id=1108447,
  add.alt=c(5/9,32), ylab=c("Maximum temperature, C","F"))
abline(h=0)

plot.seas.var(subset(mscdata,precip>0), var="precip",
  col="azure", id=1108447)

Run the code above in your browser using DataLab