TransformationPlots.saturation_scatterplot#

TransformationPlots.saturation_scatterplot(original_scale=True, apply_cost_per_unit=True, idata=None, dims=None, figsize=None, backend=None, return_as_pc=False, scatter_kwargs=None, **pc_kwargs)[source]#

Scatter plot of channel spend/data vs. mean channel contributions.

Creates one panel per channel (and per custom dimension like country or geo). Each point is one date observation.

Parameters:
original_scalebool, default True

If True, plot contributions in original (un-scaled) units.

apply_cost_per_unitbool, default True

If True and cost-per-unit data is available, the x-axis shows spend. If False, shows raw channel data.

idataaz.InferenceData, optional

Override instance data. When provided, an MMMIDataWrapper is constructed from this idata and used for all access.

dimsdict, optional

Dimension filters, e.g. {"country": "US"} or {"channel": ["tv", "radio"]}.

figsizetuple[float, float], optional

Convenience shorthand injected into figure_kwargs.

backendstr, optional

Rendering backend ("matplotlib", "plotly", "bokeh").

return_as_pcbool, default False

If True, return the PlotCollection instead of the matplotlib tuple.

scatter_kwargsdict, optional

Extra keyword arguments forwarded to the scatter visual (azp.visuals.scatter_xy).

**pc_kwargs

Forwarded to PlotCollection.wrap().

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