预测包中的geom_forecast

时间:2016-04-16 13:12:49

标签: r ggplot2

我想在geom_forecast()包中使用forecast复制Rob Hyndman的ggplot2图形示例;即:

library(magrittr)

WWWusage %>% 
  auto.arima() %>% 
  forecast(level=c(50, 80, 95)) -> fc

autoplot(WWWusage) +
  geom_forecast(fc, color='#ffcccc', show.legend=FALSE) +
  labs(x="Minute", y="Number of users", "Forecasts from ARIMA model")

show.legend选项更改为show.legend=TRUE并不会显示图例。这里有错误吗?

0 个答案:

没有答案