salvus.mesh.layered_meshing.layered_model.plot
salvus.mesh.layered_meshing.layered_model.plot salvus mesh layered_meshing layered_model plot Visualization utilities for realized layered models.
Functions
plot()
plot()def plot(model: LayeredModel, fullscreen: bool = False) -> go.Figure: ...Plot the interfaces of a realized layered model using Plotly.
Convenience wrapper around plot_interfaces that extracts
the interface list from the model.
Parameters
modelLayeredModel — A fully realized layered model.fullscreenbool — IfTrue, open the figure in a new browser tab at full size.
Returns go.Figure — A Plotly
Figure (see plot_interfaces).plot_interfaces()
plot_interfaces()def plot_interfaces(
interfaces: typing.Sequence[_interface.Interface], fullscreen: bool = False
) -> go.Figure: ...Plot a sequence of realized interfaces using Plotly.
Interfaces may be Curve (1-D), Surface (2-D), or realized
Hyperplane instances - those that have been extruded to
domain-spanning coordinates by realize_layered_model. Scalar
Hyperplane instances created via Hyperplane.at(...) without
realization are rejected.
Models with all 1-D interfaces produce a 2-D cross-section figure
(go.Scatter). Models with all 2-D interfaces produce a 3-D
surface figure (go.Surface). Mixed models raise ValueError.
Hovering over an interface shows its index.
Parameters
interfacestyping.Sequence[_interface.Interface] — Realized interfaces, ordered top-to-bottom.fullscreenbool — IfTrue, open the figure in a new browser tab at full size.
Returns go.Figure — A Plotly
Figure with one shaded fill trace per layer and one line / surface trace per interface.