Forecasting plot -adding fitting and validation area

Check out this SO answer re. using a background geom_rect(), which I think would work in your case.

Or this one specifically on time-series shading:

The key, however, will be making sure that your rectangle is behind your plot (which might be a bit trickier with autoplot).

I assume you're using zoo, since you're creating a df called zoo_obj, but if you need more help, please this into a self-contained reprex (short for reproducible example).

For pointers specific to the community site, check out the reprex FAQ.

1 Like