ribbonPlotAirTemps: Plots min, max and mean air temperatures for each day of the...

View source: R/ribbonPlotAirTemps.R

ribbonPlotAirTempsR Documentation

Plots min, max and mean air temperatures for each day of the year

Description

Creates ggplot2 ribbon plots of the daily minimum, maximum and mean values of air temperatures over a year. The shaded area indicates the range of values in the data frame for each day.

Usage

ribbonPlotAirTemps(
  obs = "",
  obsNames = "",
  tempCols = 1,
  facet = TRUE,
  facetColour = "",
  facetCols = 2
)

Arguments

obs

Required. Either a CRHMr obs data frame or a list of data frames.

obsNames

Optional. A vector containing names for the data frames. If there are more data frames than names, the data will be named obs 1, obs 2 etc.

tempCols

Optional. Column(s) containing temperatures. Can be a single value or a vector. Values will be recycled if necessary. Default is 1.

facet

Optional. If FALSE (the default), then all variables will be on a single plot. If TRUE, then each variable will be on a separate facet.

facetColour

Optional. The colour to be used for shading the ribbon plot in each facet. If not specified (the default), then each plot will be coloured separately.

facetCols

Optional. The number of columns to be used for the facets, if selected.

Value

If unsuccessful, returns FALSE. If successful, returns a ggplot2 object.

Author(s)

Kevin Shook

See Also

plotTempsByYear

Examples

p <- ribbonPlotAirTemps(BadLake7376, tempCols = 1, facet=FALSE)

CentreForHydrology/CRHMr documentation built on April 6, 2024, 5:27 p.m.