Hello,
See my reprex below. I am hoping there is some easy way to change plot_modeltime_forecast
so I can have the y axis start from 0. I can see that this function is a wrapper around plot_time_series
which is apparently in part ggplot2
code?
library(modeltime)
#> Warning: package 'modeltime' was built under R version 4.0.5
library(rsample)
library(parsnip)
#> Warning: package 'parsnip' was built under R version 4.0.5
library(timetk)
#> Warning: package 'timetk' was built under R version 4.0.5
#> Registered S3 method overwritten by 'tune':
#> method from
#> required_pkgs.model_spec parsnip
# Data
m750 <- m4_monthly %>% filter(id == "M750")
#> Error in filter(., id == "M750"): object 'id' not found
# Split Data 80/20
splits <- initial_time_split(m750, prop = 0.9)
# --- MODELS ---
# Model 1: auto_arima ----
model_fit_arima <- arima_reg() %>%
set_engine(engine = "auto_arima") %>%
fit(value ~ date, data = training(splits))
#> frequency = 12 observations per 1 year
models_tbl <- modeltime_table(
model_fit_arima
)
models_tbl %>%
modeltime_calibrate(new_data = testing(splits)) %>%
modeltime_forecast(
new_data = testing(splits),
actual_data = m750
) %>%
plot_modeltime_forecast(.interactive = FALSE)
#> Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning -
#> Inf
Created on 2021-07-23 by the reprex package (v2.0.0)