Learn R Programming

seas (version 0.3-3)

plot.seas.temp: Plot seasonal temperature normals

Description

Plot seasonal temperature normals using boxplots, and also plot seasonal diurnal variability between minimum and maximum temperature.

Usage

plot.seas.temp(x)

plot.seas.temp(x, width=11, start=1, rep=0, start.day=1,
           var=c("t_min","t_max","t_mean"),
           add.alt=FALSE, ylim, main, ylab, ...)

Arguments

x
a data.frame with Date, t_min, t_max, and (optionally) t_mean columns; x can also have id or name
width
size of bin; see mkseas
start
starting bin number; e.g., if width="mon" and start=5, the plot will start on "May" at the left-hand side
rep
repetition of the bins in the boxplots
start.day
if width is numeric, this is the day of year which is considered to be the start of the first bin
var
array specifying the names of the columns in x which relate to the minimum, maximum and mean temperatures; the units attribute for the y-axis label are taken from the minimum
add.alt
logical; add an alternative scale: if the units are in {deg}C, the alternative is {deg}F; if units are {deg}F, the alternative is {deg}C; and if units are K, the alternative is
ylim
c(min,max) range for temperature, or 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

Value

  • Returns values from boxplot statistics on mean temperature.

encoding

latin1

synopsis

plot.seas.temp(x, width=11, start=1, rep=0, start.day=1, var=c("t_min","t_max","t_mean"), add.alt=FALSE, ylim, main, ylab, ...)

Details

Plots boxplots for seasonal temperature normals from mean daily temperature, and diurnal variability with the mean difference of daily minimum and maximum temperatures (red vertical lines). If the mean is not supplied, it is calculated from the mean of daily maximum and minimum temperatures.

See Also

plot.seas.var, plot.seas.norm, plot.year Use mksub to make a subset of x.

Examples

Run this code
data(mscdata)

dat <- mksub(mscdata,id=1108447)
plot.seas.temp(dat)
plot.seas.temp(dat, width="mon", add.alt=TRUE)

# starting and ending elsewhere
plot.seas.temp(dat, start=18, rep=3)

Run the code above in your browser using DataLab