API Reference
Plotting
Time series visualizations
source
plot_series
Plot forecasts and insample values.
Type | Default | Details | |
---|---|---|---|
df | Optional | None | DataFrame with columns [id_col , time_col , target_col ]. |
forecasts_df | Optional | None | DataFrame with columns [id_col , time_col ] and models. |
ids | Optional | None | Time Series to plot. If None, time series are selected randomly. |
plot_random | bool | True | Select time series to plot randomly. |
max_ids | int | 8 | Maximum number of ids to plot. |
models | Optional | None | Models to plot. |
level | Optional | None | Prediction intervals to plot. |
max_insample_length | Optional | None | Maximum number of train/insample observations to be plotted. |
plot_anomalies | bool | False | Plot anomalies for each prediction interval. |
engine | str | matplotlib | Library used to plot. ‘plotly’, ‘plotly-resampler’ or ‘matplotlib’. |
palette | Optional | None | Name of the matplotlib colormap to use for the plots. If None, uses the current style. |
id_col | str | unique_id | Column that identifies each serie. |
time_col | str | ds | Column that identifies each timestep, its values can be timestamps or integers. |
target_col | str | y | Column that contains the target. |
seed | int | 0 | Seed used for the random number generator. Only used if plot_random is True. |
resampler_kwargs | Optional | None | Keyword arguments to be passed to plotly-resampler constructor. For further custumization (“show_dash”) call the method, store the plotting object and add the extra arguments to its show_dash method. |
ax | Union | None | Object where plots will be added. |
Returns | matplotlib or plotly figure | Plot’s figure |