MMMPlotSuite.saturation_curves#
- MMMPlotSuite.saturation_curves(curve, original_scale=False, n_samples=10, hdi_probs=None, random_seed=None, colors=None, subplot_kwargs=None, rc_params=None, **plot_kwargs)[source]#
Overlay saturation‑curve scatter‑plots with posterior‑predictive sample curves and HDI bands.
allowing you to customize figsize and font sizes.
- Parameters:
- curve
xr.DataArray Posterior‑predictive curves (e.g. dims
("chain","draw","x","channel","geo")).- original_scalebool, default=False
Plot
channel_contribution_original_scaleif True, elsechannel_contribution.- n_samples
int, default=10 Number of sample‑curves per subplot.
- hdi_probs
floatorlistoffloat, optional Credible interval probabilities (e.g. 0.94 or [0.5, 0.94]). If None, uses ArviZ’s default (0.94).
- random_seed
np.random.Generator, optional RNG for reproducible sampling. If None, uses
np.random.default_rng().- colorsiterable of
str, optional Colors for the sample & HDI plots.
- subplot_kwargs
dict, optional Passed to
plt.subplots(e.g.{"figsize": (10,8)}). Merged with the function’s own default sizing.- rc_params
dict, optional Temporary
matplotlib.rcParamsfor this plot. Example keys:"xtick.labelsize","ytick.labelsize","axes.labelsize","axes.titlesize".- **plot_kwargs
Any other kwargs forwarded to
plot_curve(for instancesame_axes=True,legend=True, etc.).
- curve
- Returns:
- fig
plt.Figure Matplotlib figure with your grid.
- axes
np.ndarrayofplt.Axes Array of shape
(n_channels, n_geo).
- fig