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 : Contrast¶
A
Contrastcontaining the simulation results to compare. Each entry must expose acp_segmentationattribute.- raw_df : bool, default False¶
If True, return the raw data used to generate the figure.
- title : str, optional¶
The title of the figure. Defaults to
"Continuous Price Segmentation". PassNonefor no title.- also_df : bool, default False¶
If True, return a tuple of
(figure, dataframe)instead of just the figure.- 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 pd.DataFrame or tuple[alt.Chart, pd.DataFrame] – The Altair chart, or the raw DataFrame if
raw_dfis True, or a(chart, dataframe)tuple ifalso_dfis True.