plot.plot_forecast()
Plot historic data and forecast with 95% prediction intervals.
Usage
plot.plot_forecast(
train,
forecast,
test=None,
metric=None,
area=None,
historic_length=42,
forecast_colour=None,
forecast_name="Forecast"
)Parameters
train: pd.DataFrame-
Historic data used to train the model.
forecast: pd.DataFrame-
Forecast.
test: pd.DataFrame | None = None-
Optional held-out observed data to display alongside the forecast.
metric: str | None = None-
Metric to plot. Provide with
areawhenforecastcontains more than one metric/area series. If None, the metric is taken fromforecast. area: str | None = None-
Area to plot. Provide with
metricwhenforecastcontains more than one metric/area series. If None, the area is taken fromforecast. historic_length: int = 42-
Number of historic days to display before the forecast.
forecast_colour: str = None-
Colour for the forecast line and prediction interval.
forecast_name: str = "Forecast"- Label to use for forecast in title of the plot.
Returns
matplotlib.figure.Figure- Forecast figure.