DecompositionPlots.contributions_over_time#

DecompositionPlots.contributions_over_time(include=None, hdi_prob=0.94, original_scale=True, idata=None, dims=None, figsize=None, backend=None, return_as_pc=False, line_kwargs=None, hdi_kwargs=None, **pc_kwargs)[source]#

Plot time-series contributions for selected contribution types with HDI bands.

Creates one panel per extra-dimension combination (e.g. one per geo for geo-segmented models). Each panel overlays one mean line and HDI band per contribution type.

Parameters:
includelist of {“channels”, “baseline”, “controls”, “seasonality”}, optional

Which contribution types to plot. None means all available.

hdi_probfloat, default 0.94

Probability mass for the HDI band.

original_scalebool, default True

Whether to return contributions in original scale.

idataaz.InferenceData, optional

Override instance data for this call only.

dimsdict[str, Any], optional

Subset dimensions, e.g. {"geo": ["CA"]}.

figsizetuple[float, float], optional

Injected into figure_kwargs.

backendstr, optional

Rendering backend. Non-matplotlib requires return_as_pc=True.

return_as_pcbool, default False

If True, return the PlotCollection instead of (Figure, NDArray[Axes]).

line_kwargsdict, optional

Extra kwargs forwarded to azp.visuals.line_xy for every mean line.

hdi_kwargsdict, optional

Extra kwargs forwarded to azp.visuals.fill_between_y for every HDI band.

**pc_kwargs

Forwarded to PlotCollection.wrap(). Use col_wrap to override the default single-column layout.

Returns:
tuple[Figure, NDArray[Axes]] or PlotCollection