SensitivityPlots.marginal#

SensitivityPlots.marginal(idata=None, dims=None, aggregation=None, x_sweep_axis='relative', apply_cost_per_unit=True, hdi_prob=0.94, figsize=None, backend=None, return_as_pc=False, line_kwargs=None, hdi_kwargs=None, **pc_kwargs)[source]#

Plot marginal effects (idata.sensitivity_analysis["marginal_effects"]).

Parameters:
idataaz.InferenceData, optional

Override instance data.

dimsdict, optional

Dimension filters.

aggregationdict, optional

Aggregation to apply before plotting.

x_sweep_axis{“relative”, “absolute”}, default “relative”

"relative" plots sweep multipliers; "absolute" scales by total channel spend/data.

apply_cost_per_unitbool, default True

When x_sweep_axis="absolute", use spend (True) or raw channel data (False).

hdi_probfloat, default 0.94

Credible interval probability for the HDI band.

figsizetuple[float, float], optional

Convenience shorthand for figure size.

backendstr, optional

Rendering backend.

return_as_pcbool, default False

Return PlotCollection instead of matplotlib tuple.

line_kwargsdict, optional

Extra keyword arguments for the mean line visual.

hdi_kwargsdict, optional

Extra keyword arguments for the HDI band visual.

**pc_kwargs

Forwarded to PlotCollection.grid().

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