autoplot.breakpoints: Autoplot 'strucchange::breakpoints'

View source: R/fortify_changepoint.R

autoplot.breakpointsR Documentation

Autoplot strucchange::breakpoints

Description

Autoplot strucchange::breakpoints

Usage

## S3 method for class 'breakpoints'
autoplot(
  object,
  data = NULL,
  cpt.colour = "#FF0000",
  cpt.linetype = "dashed",
  ...
)

Arguments

object

strucchange::breakpoints or strucchange::breakpointsfull instance.

data

Original time series. Mandatory for plotting strucchange::breakpoints instance.

cpt.colour

Line colour for changepoints

cpt.linetype

Line type for changepoints

...

other arguments passed to autoplot.ts

Value

ggplot

Examples

## Not run: 
library(strucchange)
bp.nile <- breakpoints(Nile ~ 1)
autoplot(bp.nile)
autoplot(bp.nile, is.date = TRUE)
autoplot(breakpoints(bp.nile, breaks = 2), data = Nile)

## End(Not run)

ggfortify documentation built on May 29, 2024, 7:19 a.m.