autoplot.seas: Plot time series decomposition components using ggplot

Description Usage Arguments Value Author(s) See Also Examples

Description

Produces a ggplot object of seasonally decomposed time series for objects of class "stl" (created with stl), class "seas" (created with seas), or class "decomposed.ts" (created with decompose).

Usage

1
2
3
4
5
6
7
8
## S3 method for class 'seas'
autoplot(object, labels = NULL, range.bars = NULL, ...)
## S3 method for class 'stl'
autoplot(object, labels = NULL, range.bars = TRUE, ...)
## S3 method for class 'decomposed.ts'
autoplot(object, labels = NULL, range.bars = NULL, ...)
## S3 method for class 'StructTS'
autoplot(object, labels = NULL, range.bars = TRUE, ...)

Arguments

object

Object of class “seas”, “stl”, or “decomposed.ts”.

labels

Labels to replace "seasonal", "trend", and "remainder".

range.bars

Logical indicating if each plot should have a bar at its right side representing relative size. If NULL, automatic selection takes place.

...

Other plotting parameters to affect the plot.

Value

Returns an object of class ggplot.

Author(s)

Mitchell O'Hara-Wild

See Also

seas, stl, decompose, StructTS, plot.stl.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(ggplot2)
co2 
nottem 

## Not run: 
library(seasonal)
m <- seas(USAccDeaths)
autoplot(m)

## End(Not run)

pli2016/forecast documentation built on May 25, 2019, 8:22 a.m.