Learn R Programming

wq (version 0.4.3)

plotTsAnom: Anomaly plot of time series

Description

Series are illustrated by vertical lines extending from individual data values to the long-term mean. The axes are not scaled in any way. Anomaly plots are useful for visualizing shifts in time series levels.

Usage

plotTsAnom(x, xlab, ylab, plot.order = colnames(x), 
  strip.labels = colnames(x), ...)

Arguments

Value

A plot and corresponding object of class ggplot.

Details

Options are passed to the underlying facet_wrap function in ggplot2. The main ones of interest are ncol for setting the number of plotting columns and scales = "free_y" for allowing the y scales of the different plots to be independent.

See Also

plotTs

Examples

Run this code
### Spring bloom size for 6 stations in SF Bay
bloom <- aggregate(sfbayChla[, 1:6], 1, meanSub, sub=3:5)
plotTsAnom(bloom, ylab = 'Chl-a')

Run the code above in your browser using DataLab