我想在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
并不会显示图例。这里有错误吗?