suboptimumg.plotting.internal_data_plots#

suboptimumg.plotting.internal_data_plots.plot_competition_traces(competitions, x_axis, *, labels=None, title=None, layout_config=LayoutConfig(width=1000, height=700, grid_width_per_col=400, grid_height_per_row=350, grid_horizontal_spacing=0.08, grid_vertical_spacing=0.12, margin={'l': 70, 'r': 50, 't': 90, 'b': 70}, plot_bgcolor='white', scene_bgcolor='rgba(240, 240, 240, 0.8)', title_x=0.5, title_xanchor='center', title_yanchor='top'), font_config=FontConfig(large=24, medium=16, small=12))[source]#

Plot one subplot for each event in a competition, displaying velocity, accel, and power traces.

Allows overlaying traces across multiple competitions.

Parameters:
  • competitions (CompetitionResults or List[CompetitionResults]) – Competition results to plot

  • x_axis (Axis) – Axis to use for the x-axis (distance or time)

  • labels (List[str], optional) – Labels for each competition (e.g., [“baseline”, “new_config”]). If not provided, defaults to “comp_0”, “comp_1”, etc.

  • title (str, optional) – Plot title

  • layout_config (LayoutConfig, optional) – Layout configuration object

  • font_config (FontConfig, optional) – Font configuration object

Returns:

Plotly figure object

Return type:

go.Figure

suboptimumg.plotting.internal_data_plots.plot_event_traces(results, x_axis, *, labels=None, metrics=[Metric.VELOCITY, Metric.ACCEL, Metric.POWER], title=None, layout_config=LayoutConfig(width=1000, height=700, grid_width_per_col=400, grid_height_per_row=350, grid_horizontal_spacing=0.08, grid_vertical_spacing=0.12, margin={'l': 70, 'r': 50, 't': 90, 'b': 70}, plot_bgcolor='white', scene_bgcolor='rgba(240, 240, 240, 0.8)', title_x=0.5, title_xanchor='center', title_yanchor='top'), font_config=FontConfig(large=24, medium=16, small=12))[source]#

Plot final velocity, acceleration, and power traces on a single plot.

Allows overlaying traces across multiple lapsims for direct comparison of different vehicle configurations.

Parameters:
  • results (LapsimResults or List[LapsimResults]) – Results to plot. Pass a list to overlay multiple configurations.

  • x_axis (Axis) – Axis to use for the x-axis (distance or time)

  • labels (List[str], optional) – Labels for each result set (e.g., [“baseline”, “new_config”]). If not provided, defaults to “run_0”, “run_1”, etc.

  • metrics (List[Metric], optional) – Metrics to plot. Defaults to all three (velocity, accel, power)

  • title (str, optional) – Plot title

  • layout_config (LayoutConfig, optional) – Layout configuration object

  • font_config (FontConfig, optional) – Font configuration object

Returns:

Plotly figure object

Return type:

go.Figure

suboptimumg.plotting.internal_data_plots.plot_per_seed(results, x_axis, *, include_indices=None, include_power=True, include_seed_overview=True, title=None, layout_config=LayoutConfig(width=1000, height=700, grid_width_per_col=400, grid_height_per_row=350, grid_horizontal_spacing=0.08, grid_vertical_spacing=0.12, margin={'l': 70, 'r': 50, 't': 90, 'b': 70}, plot_bgcolor='white', scene_bgcolor='rgba(240, 240, 240, 0.8)', title_x=0.5, title_xanchor='center', title_yanchor='top'), font_config=FontConfig(large=24, medium=16, small=12))[source]#

Draws one subplot per seed index showing velocity proposals, accel, power, and masks.

Allows overlaying seed traces across multiple lapsims.

Parameters:
  • results (LapsimResults or List[LapsimResults]) – For consistency, these should be the same event across different runs

  • x_axis (Axis) – Use distance or time for the x-axis

  • include_indices (List[int], optional) – Specify which seeds to include. e.x. [0, 1] only includes first two seeds. Defaults to all seeds found.

  • include_power (bool, optional) – Include power proposals (kW). True by default

  • include_seed_overview (bool, optional) – Prepend a subplot showing v_max_profile with seed positions marked as red dots. True by default.

  • title (str, optional) – Plot title

  • layout_config (LayoutConfig, optional) – Layout configuration object

  • font_config (FontConfig, optional) – Font configuration object

Returns:

Plotly figure object

Return type:

go.Figure