Plot a windrose object.

# S4 method for windrose
plot(
  x,
  type = c("count", "mean", "median", "fivenum"),
  convention = c("meteorological", "oceanographic"),
  mgp = getOption("oceMgp"),
  mar = c(mgp[1], mgp[1], 1 + mgp[1], mgp[1]),
  col,
  ...
)

Arguments

x

a windrose object.

type

The thing to be plotted, either the number of counts in the angle interval, the mean of the values in the interval, the median of the values, or a fivenum() representation of the values.

convention

String indicating whether to use meteorological convention or oceanographic convention for the arrows that emanate from the centre of the rose. In meteorological convection, an arrow emanates towards the right on the diagram if the wind is from the east; in oceanographic convention, such an arrow indicates flow to the east.

mgp

Three-element numerical vector to use for par(mgp), and also for par(mar), computed from this. The default is tighter than the R default, in order to use more space for the data and less for the axes.

mar

Four-element numerical vector to be used with par("mar").

col

Optional list of colors to use. If not set, the colors will be c("red", "pink", "blue", "lightgray"). For the first three types of plot, the first color in this list is used to fill in the rose, the third is used for the petals of the rose, and the fourth is used for grid lines. For the "fivenum" type, the first color is used for the inter-quartile range, the second is used outside this range, the third is used for the median, and the fourth is, again, used for the grid lines.

...

Optional arguments passed to plotting functions.

See also

Examples

library(oce) opar <- par(no.readonly = TRUE) xcomp <- rnorm(360) + 1 ycomp <- rnorm(360) wr <- as.windrose(xcomp, ycomp) par(mfrow=c(1, 2)) plot(wr) plot(wr, "fivenum")
par(opar)