phenotypic.abc_.BoundFigures#

class phenotypic.abc_.BoundFigures(provider: FigureProvider, subject: Any)[source]#

Bases: object

A subject bound to a provider’s figures — the transient renderable the GUI Dash adapter consumes.

The per-render cache lives here, not on the provider, so a pydantic model stays free of transient state. Discard after use.

Methods

__init__

render

Render spec with the given control values, caching by (name, values).

specs

The provider's figures, sorted by definition order.

Attributes

subject

The bound subject (may be None for helpers that hold their own).

Parameters:
property subject: Any#

The bound subject (may be None for helpers that hold their own).

specs() list[FigureSpec][source]#

The provider’s figures, sorted by definition order.

Return type:

list[FigureSpec]

render(spec: FigureSpec, **control_values: Any) go.Figure[source]#

Render spec with the given control values, caching by (name, values).

Parameters:
  • spec (FigureSpec) – The figure to render.

  • **control_values (Any) – Control keyword values (simple scalars).

Returns:

The themed plotly.graph_objects.Figure.

Return type:

go.Figure