plotWAC: plotWAC

Description Usage Arguments Details Author(s) Examples

Description

Convenience routine for plots

Usage

1
2
3
plotWAC(x, y = NA, col = "blue", xlab = "TIME [UTC]", ylab = "",
  lwd = 2, type = "l", lty = 1, logxy = "", pch = 20, cex = 1,
  legend.position = "bottomright", ...)

Arguments

x

Usually, Time from a data.frame; a vector of abscissa values. Optionally, a data.frame containing multiple variables to plot and superceding parameter y.

y

A vector of ordinate values for points to plot. If the first parameter is a data.frame, this argument is ignored.

col

Color to pass to plot (default: blue). Can be multiple values to set colors for multiple variables in data.frame mode. There are defaults ('blue', 'darkgreen', 'red', 'skyblue', 'darkorange') but values provided with this parameter precede that sequence of colors.

xlab

Label for the abscissa, to pass to plot (default: "TIME [UTC]")

ylab

Label for the ordinate, to pass to plot (default: "" or, for data.frame mode, first variable name)

lwd

Line width to pass to plot (default: 1); can be a vector

type

Plot type to pass to plot (default: "l")

lty

Line type to pass to plot (default: 1). Can be a vector for multiple variables provided in data.frame mode.

logxy

Set to 'y' for log axes. This is provided (vs log='y') because it makes possible translation of axis labels to 10^i format.

pch

Character number to use for scatterplots. Ignored if plot type is 'l'.

cex

Character size to use for scatterplots. Ignored if plot type is 'l'.

legend.position

For multiple-line calls with a data.frame, this parameter specifies the position for the legend. The default is 'bottomright'. The legend can also be suppressed by setting this parameter to NA. Then a legend can still be added after the plotWAC call.

...

Additional arguments to pass to plot(), but don't include col, xlab, ylab, lwd, type, xaxt or yaxt

Details

Sets some plot defaults and calls plot and axis. For a data.frame argument, sets plot limits to cover range of all variables in the data.frame.

Author(s)

William Cooper

Examples

1
2
3
4
5
6
7
plotWAC (RAFdata[, c("Time", "ATX", "DPXC")], legend.position="right")
plotWAC (subset (RAFdata,, c(Time, TASX, GGVNS)), legend.position='topright')
## Not run: with(RAFdata, plotWAC (Time, TASX, ylab="TAS"))
## Not run: with(RAFdata, plotWAC (Time, PSXC, lty=2, ylab='ambient pressure [hPa]'))
## Not run: plotWAC (RAFdata[, c("Time", "PSXC")])
## Not run: plotWAC (subset (RAFdata, ATX > -35, c(Time,ATX,DPXC)))
## Not run: plotWAC (Rsubset (RAFdata, Var=c('ATX', 'DPXC')))

WilliamCooper/Ranadu documentation built on July 10, 2019, 12:40 a.m.