seasonPlot: Season Plot

seasonPlotR Documentation

Season Plot

Description

Creates a plot of data on a yearly cycle.

Usage

seasonPlot(x, y, Plot = list(), yaxis.log = FALSE, yaxis.rev = FALSE,
  yaxis.range = c(NA, NA), xaxis.range = "", ylabels = 7,
  xlabels = 7, xtitle = "", ytitle = "", caption = "",
  margin = c(NA, NA, NA, NA), ...)

## S4 method for signature 'ANY,numeric'
seasonPlot(x, y, Plot = list(name = "", what =
  "points", type = "solid", width = "standard", symbol = "circle", filled =
  TRUE, size = 0.09, color = "black"), yaxis.log = FALSE,
  yaxis.rev = FALSE, yaxis.range = c(NA, NA),
  xaxis.range = c("calendar", "water", "climate"), ylabels = 7,
  xlabels = "Auto", xtitle = "", ytitle = deparse(substitute(y)),
  caption = "", margin = c(NA, NA, NA, NA), ...)

## S4 method for signature 'character,numeric'
seasonPlot(x, y, Plot = list(name = "",
  what = "lines", type = "solid", width = "standard", symbol = "circle",
  filled = TRUE, size = 0.09, color = "black"), yaxis.log = FALSE,
  yaxis.rev = FALSE, yaxis.range = c(NA, NA),
  xaxis.range = c("calendar", "water", "climate"), ylabels = 7,
  xlabels = "Auto", xtitle = "", ytitle = deparse(substitute(y)),
  caption = "", margin = c(NA, NA, NA, NA), ...)

Arguments

x

the x-coordinate data.

y

the y-coordinate data.

Plot

parameters defining the characteristics of the plot. See setPlot for a description of the parameters.

yaxis.log

logical, if TRUE, then log-transform the y axis.

yaxis.rev

logical, if TRUE, then reverse the y axis.

yaxis.range

set the range of the y-axis.

xaxis.range

set the range of the x-axis. Must be one of "calendar," "water," or "climate" to set the type of year that is shown on the x-axis.

ylabels

set up y-axis labels. See linearPretty for details.

xlabels

set up x-axis labels. See Details.

xtitle

the x-axis title (also called x-axis caption).

ytitle

the y-axis title (also called y-axis caption).

caption

the figure caption.

margin

set the plot area margins, in units of lines of text. Generally all NA or the output from setGraph if appropriate.

...

arguments for specific methods.

Details

For seasonPlot, the value for xlabels must be one of "full," the full month names; "abbrev," abbreviations; or "letter," the first letter of the month. The default is "Auto," which will select an appropriate labeling scheme.

Value

Information about the graph.

Methods

signature(x = "ANY", y = "numeric")

Create a seasonal plot for any valid date data and numeric y data.

signature(x = "character", y = "numeric")

Create a seasonal plot for date data in the form of month and day, like "Jan 01" or "Jaunary 01." Typically used to plot daily mean values.

Note

A call should be made to setPage to set up the graphics environment before calling seasonPlot.

To add a plot to the graph created by seasonPlot, the x-axis data must be expressed as decimal time relative to January 1. The function baseDay2decimal can be used to convert data in the form of base day to decimal time.

See Also

setPage, timePlot, baseDay2decimal

Examples

## Not run: 
# the months function is in lubridate
X <- as.Date("2001-01-15") + months(0:11)
set.seed(1)
Y <- runif(12)
setGD()
seasonPlot(X, Y)
# For more details of seasonPlot see
vignette(topic="LineScatter", package="smwrGraphs")

## End(Not run)

USGS-R/smwrGraphs documentation built on Oct. 11, 2022, 6:11 a.m.