【发布时间】:2021-11-28 08:31:46
【问题描述】:
?autoplot.forecast
If showgap=FALSE, the gap between the historical observations and the forecasts is removed.
但是,对我来说,它并没有被删除。
library(forecast)
d <- ts(rnorm(36), start = c(2021, 1), frequency = 12)
fc <- snaive(d, h = 12)
autoplot(fc, showgap = FALSE)
使用plot 可以正常工作
plot(fc, showgap = FALSE)
【问题讨论】:
-
可能是
ggplot2错误。为什么不直接使用plot,反正看起来更好。
标签: r ggplot2 forecast autoplot