suboptimumg.plotting.plotting_constants#

Configuration objects for plotting module.

This module provides Plotly-style configuration objects to control various aspects of plots without cluttering function interfaces. All magic numbers are centralized here for easy customization.

class suboptimumg.plotting.plotting_constants.ColorbarConfig[source]#

Bases: BaseModel

Colorbar configuration for 3D plots.

Fields#

Field

Type

Required

Default

length

float

No

0.7

thickness

int

No

15

Parameters:
  • thickness (int)

  • length (float)

length: float#
thickness: int#
class suboptimumg.plotting.plotting_constants.FontConfig[source]#

Bases: BaseModel

Font configuration for plot elements.

Simplified to three sizes that work across all plot types: - Large: Titles - Medium: Subtitles, axis labels, legend titles - Small: Tick labels, legend items, contour labels

Fields#

Field

Type

Required

Default

large

int

No

24

medium

int

No

16

small

int

No

12

Parameters:
  • large (int)

  • medium (int)

  • small (int)

large: int#
medium: int#
small: int#
class suboptimumg.plotting.plotting_constants.LayoutConfig[source]#

Bases: BaseModel

Layout configuration for plot dimensions and spacing.

Unified dimensions that work across all plot types. Users can override when creating custom plots if needed.

Fields#

Field

Type

Required

Default

grid_height_per_row

int

No

350

grid_horizontal_spacing

float

No

0.08

grid_vertical_spacing

float

No

0.12

grid_width_per_col

int

No

400

height

int

No

700

margin

Dict[str, int]

No

factory

plot_bgcolor

str

No

'white'

scene_bgcolor

str

No

'rgba(240, 240, 240, 0.8)'

title_x

float

No

0.5

title_xanchor

str

No

'center'

title_yanchor

str

No

'top'

width

int

No

1000

Parameters:
  • width (int)

  • height (int)

  • grid_width_per_col (int)

  • grid_height_per_row (int)

  • grid_horizontal_spacing (float)

  • grid_vertical_spacing (float)

  • margin (Dict[str, int])

  • plot_bgcolor (str)

  • scene_bgcolor (str)

  • title_x (float)

  • title_xanchor (str)

  • title_yanchor (str)

grid_height_per_row: int#
grid_horizontal_spacing: float#
grid_vertical_spacing: float#
grid_width_per_col: int#
height: int#
margin: Dict[str, int]#
plot_bgcolor: str#
scene_bgcolor: str#
title_x: float#
title_xanchor: str#
title_yanchor: str#
width: int#
class suboptimumg.plotting.plotting_constants.ReferenceLineConfig[source]#

Bases: BaseModel

Configuration for reference lines (h_line, v_line).

This class combines the line value, label, and styling into a single object. Pass instances of this class to plotting functions instead of separate parameters.

Fields#

Field

Type

Required

Default

color

str

No

'red'

dash

str

No

'dash'

label

str | None

No

None

value

float | None

No

None

width

int

No

4

Parameters:
  • value (float | None)

  • label (str | None)

  • width (int)

  • dash (str)

  • color (str)

color: str#
dash: str#
label: str | None#
value: float | None#
width: int#
class suboptimumg.plotting.plotting_constants.SceneConfig[source]#

Bases: BaseModel

3D scene configuration for surface plots.

Fields#

Field

Type

Required

Default

aspect_ratio_x

float

No

1.0

aspect_ratio_y

float

No

1.0

aspect_ratio_z

float

No

0.8

camera_distance

float

No

2.0

camera_up_x

float

No

0

camera_up_y

float

No

0

camera_up_z

float

No

1

camera_z

float

No

0.8

default_view_angle

int

No

-60

Parameters:
  • aspect_ratio_x (float)

  • aspect_ratio_y (float)

  • aspect_ratio_z (float)

  • camera_distance (float)

  • camera_z (float)

  • default_view_angle (int)

  • camera_up_x (float)

  • camera_up_y (float)

  • camera_up_z (float)

aspect_ratio_x: float#
aspect_ratio_y: float#
aspect_ratio_z: float#
camera_distance: float#
camera_up_x: float#
camera_up_y: float#
camera_up_z: float#
camera_z: float#
default_view_angle: int#
class suboptimumg.plotting.plotting_constants.SmoothingConfig[source]#

Bases: BaseModel

Smoothing and interpolation configuration.

Fields#

Field

Type

Required

Default

interp_factor

int

No

5

interp_method

str

No

'linear'

smoothing_sigma

float

No

0

Parameters:
  • interp_factor (int)

  • smoothing_sigma (float)

  • interp_method (str)

interp_factor: int#
interp_method: str#
smoothing_sigma: float#