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:
- curve
xr.DataArray Sampled curve with individual components. Must have the
{prefix}dimension (e.g."fourier"), as returned bysample_curve()withsum=False.- n_samples
int, optional Number of sample curves to show per component.
- hdi_probs
floatorlistoffloat, optional HDI probability levels for the component bands.
- random_seed
np.random.Generator, optional Random seed for sample selection.
- subplot_kwargs
dict, optional Keyword arguments for the subplot layout.
- sample_kwargs
dict, optional Keyword arguments for sample line plotting.
- hdi_kwargs
dict, optional Keyword arguments for HDI band plotting.
- axes
npt.NDArray[plt.Axes], optional Pre-existing axes to plot on.
- same_axesbool, optional
Plot all component groups on the same axes. Default False.
- colors
Iterable[str], optional Colors for the component curves.
- legendbool, optional
Show legend. Default True.
- sel_to_string
SelToString, optional Function to convert selection dict to title string.
- curve
- Returns:
tuple[plt.Figure,npt.NDArray[plt.Axes]]Matplotlib figure and axes.