Skip to content

Commit

Permalink
Merge pull request #478 from mitchelloharawild/quickfix
Browse files Browse the repository at this point in the history
Fixed series argument in autolayer.forecast
  • Loading branch information
robjhyndman committed Jan 12, 2017
2 parents fb2cb9e + a38512f commit d80f620
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/ggplot.R
Expand Up @@ -1276,10 +1276,10 @@ autolayer.forecast <- function(object, series = NULL, PI = TRUE, showgap = TRUE,
data <- fortify(object, PI=PI, showgap=showgap)
mapping <- ggplot2::aes_(x = ~x, y = ~y)
if(!is.null(object$series)){
data <- transform(data, series=object$series)
data[["series"]] <- object$series
}
if(!is.null(series)){
data <- transform(data, series=series)
data[["series"]] <- series
mapping$colour <- quote(series)
}
if(PI){
Expand Down

0 comments on commit d80f620

Please sign in to comment.