?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)