WeeklyFourier.plot_decomposition#

WeeklyFourier.plot_decomposition(curve, n_samples=10, hdi_probs=None, random_seed=None, subplot_kwargs=None, sample_kwargs=None, hdi_kwargs=None, axes=None, same_axes=False, colors=None, legend=None, sel_to_string=None)[source]#

Plot the decomposition of the Fourier seasonality into individual components.

Parameters:
curvexr.DataArray

Sampled curve with individual components. Must have the {prefix} dimension (e.g. "fourier"), as returned by sample_curve() with sum=False.

n_samplesint, optional

Number of sample curves to show per component.

hdi_probsfloat or list of float, optional

HDI probability levels for the component bands.

random_seednp.random.Generator, optional

Random seed for sample selection.

subplot_kwargsdict, optional

Keyword arguments for the subplot layout.

sample_kwargsdict, optional

Keyword arguments for sample line plotting.

hdi_kwargsdict, optional

Keyword arguments for HDI band plotting.

axesnpt.NDArray[plt.Axes], optional

Pre-existing axes to plot on.

same_axesbool, optional

Plot all component groups on the same axes. Default False.

colorsIterable[str], optional

Colors for the component curves.

legendbool, optional

Show legend. Default True.

sel_to_stringSelToString, optional

Function to convert selection dict to title string.

Returns:
tuple[plt.Figure, npt.NDArray[plt.Axes]]

Matplotlib figure and axes.