seriesPlot: Series Plot

View source: R/seriesPlot.R

seriesPlotR Documentation

Series Plot

Description

Creates a plot of a regular series on a seasonal cycle; the annual values for each season are plotted.

Usage

seriesPlot(x, SeasonLine = list(name = "", what = "vertical", color =
  "black"), SeasonPoint = list(name = "", what = "points", symbol =
  "circle", filled = TRUE, size = 0.09, color = "black"),
  yaxis.log = FALSE, yaxis.range = c(NA, NA), ylabels = 7, xlabels,
  xtitle = "", ytitle = "", caption = "", margin = c(NA, NA, NA,
  NA), ...)

## Default S3 method:
seriesPlot(x, SeasonLine = list(name = "", what =
  "vertical", color = "black"), SeasonPoint = list(name = "", what =
  "points", symbol = "circle", filled = TRUE, size = 0.09, color =
  "black"), yaxis.log = FALSE, yaxis.range = c(NA, NA), ylabels = 7,
  xlabels = frequency(x), xtitle = "",
  ytitle = deparse(substitute(x)), caption = "", margin = c(NA, NA,
  NA, NA), ...)

Arguments

x

data that can be treated as a regularly-spaced time series. Missing values are permitted, but result in missing seasons.

SeasonLine

control parameters of the lines in the plot. See Details.

SeasonPoint

control parameters of the points in the plot. See Details.

yaxis.log

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

yaxis.range

set the range of the y axis. See Details.

ylabels

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

xlabels

set the x-axis labels and number of seasons when x is a simple numeric vector, may be a single numeric value indicating the number of seasons in x or a vector of the names of the seasons. See namePretty for details. If X is a time-series object, then the labels are set to the frequency characteristic of x.

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.

...

any additional arguments required for specific methods.

Details

The argument what for SeasonLine must be either "lines" or "vertical." See monthplot for more information.

The argument what for SeasonPoint can be set to "none" to suppress drawing of symbols or "points" to draw symbols at the ends of the line segments described by SeasonLine.

For linear axes, the range can be set to virtually any pair of values. For log axes, the choice of range is more resticted—for less than one log-cycle, powers of whole numbers can be used; from 1 to about 3 log cycles, the choces should be powers of 3 or 10; and for more than 3 log cycles, the range sould be expressed only in powers of 10.

Value

Information about the graph.

Note

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

See Also

setPage, seasonPlot, monthplot

Examples

## Not run: 
set.seed(1)
X <- rnorm(32)
setGD()
seriesPlot(X, xlabels=c("A", "B", "C", "D"))
# For more details of  seriesPlot see
vignette(topic="LineScatter", package="smwrGraphs")

## End(Not run)

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