A ggplot2 theme for SOE time series figures

theme_ts(...)

Examples

m <- 0.1
x <- 1:30
y <-  m*x + rnorm(30, sd = 0.35)

data <- data.frame(x = x,
                  y = y)

#Plot series with trend and SOE plot theme
ggplot(data = data) +
  geom_line(aes(x = x, y = y)) +
  stat_gls(aes(x = x, y = y, color = stat(col)))+
  theme_ts()
#> Error in stat_gls(aes(x = x, y = y, color = stat(col))): could not find function "stat_gls"