Skip to content

Figure mpl

subsurfaceio.reference_figure.figure_mpl

Matplotlib renderer for reference figure specs.

Classes:

Name Description
MplReferenceFigure

Matplotlib figure that draws a ReferenceFigureSpec.

MplReferenceFigure pydantic-model

Bases: ShapesMixin, LegendMixin, MplFigure

Matplotlib figure that draws a ReferenceFigureSpec.

Create via from_spec or ReferenceFigureSpec.render_mpl. Styling uses STYLE_RC, applied by the inherited plot.

Fields:

fig property

fig: Figure

Rendered matplotlib figure.

Raises:

Type Description
RuntimeError

When accessed before plot.

spec pydantic-field

spec: ReferenceFigureSpec

from_spec classmethod

from_spec(
    spec: ReferenceFigureSpec, **plot_kwargs: Any
) -> Self

Build a renderer from a spec and optional matplotlib-express overrides.

Parameters:

Name Type Description Default
spec ReferenceFigureSpec

Cached catalog spec.

required
**plot_kwargs Any

Merged into plot_model (for example data_frame). Pass overlays for annotation traces (sieve D-values, Dash UI, etc.).

{}

Returns:

Type Description
Self

Configured figure; call plot to draw.