Learn R Programming

wq (version 0.2-9)

plotSeason: Plots seasonal patterns for a time series

Description

Divides the time range for a monthly time series into different eras and plots composites of seasonal pattern. Can also plot each month separately for the entire record.

Usage

plotSeason(x, type = c("by.era", "by.month"), num = 4, ylab = NULL, ...)

Arguments

Value

A plot (and the corresponding object of class "ggplot").

Details

When plotted "by.era", the composite patterns are plotted in a horizontal row for easier comparison, which limits the number of periods that can be examined. Boxes based on fewer than half of the maximum possible years available are outlined in red. When plotted "by.month", parameters can be passed to facet_wrap in ggplot2. The most useful parameters here are ncol (or nrow), which determines the number of columns (or rows) of plots, and scales, which can be set to "free_y" to allow the y-axis to change for each individual month. A loess smoother with span = 1 is added to each plot. As always, and especially with these plots, experiment with the device aspect ratio and size to get the clearest information.

See Also

decompTs, plotSeasonTrend

Examples

Run this code
chl27 <- sfbayChla[, 's27']
plotSeason(chl27, num = 3, ylab = 'Stn 27 Chl-a')

Run the code above in your browser using DataLab