fig_cp_segmentation

passengersim.contrast.fig_cp_segmentation(summaries: Contrast, *, raw_df: bool = False, title: str | None = 'Continuous Price Segmentation', also_df: bool = False, height: int = 600, width: int = 300) Chart | tuple[Chart, DataFrame] | DataFrame[source]

Generate a figure contrasting continuous price segmentation for one or more runs.

Parameters:
summaries : dict[str, SimulationTables]

A dictionary of summary tables for different runs.

raw_df : bool, default False

If True, return the raw data used to generate the figure.

title : str, default "Continuous Price Segmentation"

The title of the figure.

also_df : bool, default False

If True, return the raw data used to generate the figure in addition to the figure itself.

height : int, default 600

The height of each facet panel of the figure, in pixels.

width : int, default 300

The width of each facet panel of the figure, in pixels.

Returns:

alt.Chart or tuple[alt.Chart, pd.DataFrame] or pd.DataFrame – The generated Altair chart or the raw data used to generate the figure.