Skip to content

← Back to handlers

_plot_customizer

Source: Distributed_Design_Optimizer/postprocess/handlers/_plot_customizer.py

Plot customization helpers for PlotHandler — Plotly implementation.

Functions

apply_font(fig: go.Figure, config: PlotConfig) → None

Apply per-element font settings to all text elements.

Args:

fig: Plotly Figure to update in place.
config: Plot configuration with font settings.

apply_labels(fig: go.Figure, config: PlotConfig) → None

Apply custom axis labels and title.

Args:

fig: Plotly Figure to update in place.
config: Plot configuration with custom label text.

apply_reference_lines(fig: go.Figure, config: PlotConfig) → None

Add / replace horizontal reference lines as traces (shown in legend).

Args:

fig: Plotly Figure to update in place.
config: Plot configuration with reference line definitions.

apply_per_line_styles(fig: go.Figure, config: PlotConfig) → None

Update trace colors, dash styles, and widths from per-line config.

Args:

fig: Plotly Figure to update in place.
config: Plot configuration with per-line style overrides.

apply_legend(fig: go.Figure, config: PlotConfig) → None

Show / hide legend and apply themed positioning.

Args:

fig: Plotly Figure to update in place.
config: Plot configuration with legend visibility and position.

apply_all(fig: go.Figure, config: PlotConfig) → None

Apply all customizations to a Plotly figure in order.

Args:

fig: Plotly Figure to update in place.
config: Plot configuration with all customization settings.