suboptimumg.plotting.bar_chart#

class suboptimumg.plotting.bar_chart.BarChartSeries[source]#

Bases: BaseModel

One variable’s worth of points to plot as a column in a bar chart.

Fields#

Field

Type

Required

Default

plausible

NDArray[bool]

Yes

points

NDArray[float64]

Yes

var_name

str

Yes

Parameters:
  • var_name (str)

  • points (NDArray[float64])

  • plausible (NDArray[bool])

plausible: NDArray[bool]#
points: NDArray[float64]#
var_name: str#
suboptimumg.plotting.bar_chart.plot_bar_chart(data_by_variable, percent_steps, baseline_value, title, y_label, theme='chart_default', font_config=FontConfig(large=24, medium=16, small=12), 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'))[source]#

Generic bar chart plotting utility for showing multiple data series.

Parameters:
  • data_by_variable (list[BarChartSeries]) – One series per variable to show along the x-axis

  • percent_steps (numpy.ndarray) – Array of percent step values used in the sweep

  • baseline_value (float) – Float value to draw as a horizontal baseline

  • title (str) – Plot title

  • y_label (str) – Y-axis label

  • theme (str, optional) – Color theme name for the gradient

  • font_config (FontConfig, optional) – Font sizes for the chart

  • layout_config (LayoutConfig, optional) – Layout dimensions for the chart

Returns:

Plotly figure object

Return type:

go.Figure