Skip to content

Figure plotly

subsurfaceio.reference_figure.figure_plotly

Plotly renderer for reference figure specs.

Classes:

Name Description
PlotlyReferenceFigure

Plotly figure that draws a ReferenceFigureSpec.

PlotlyReferenceFigure pydantic-model

Bases: ShapesMixin, PlotlyFigure

Plotly figure that draws a ReferenceFigureSpec.

Create via from_spec or ReferenceFigureSpec.render_plotly.

Fields:

fig property

fig: Figure

Rendered Plotly 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 Plotly 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.