eqiora.matplotlib
Plot Eqiora results with Matplotlib.
View sourceExample: save a spatial field plot
Section titled “Example: save a spatial field plot”Run uv add "eqiora[matplotlib]" in the project environment described in
Get started. Continue with a scalar spatial result and its
Model field field from modeling:
from eqiora.matplotlib import plot_scalar_field
figure = plot_scalar_field(result, field=field)figure.savefig("field.png", dpi=150)The color scale shows the field’s values on its mesh. For a displacement
field, use plot_deformed_field(result, field=field, scale=10.0); scale
magnifies the display without changing the computed displacement.
plot_deformed_field
Section titled “plot_deformed_field”Plot the reference geometry and the geometry deformed by a scaled displacement.
@overloaddef plot_deformed_field(trajectory: Trajectory, /, *, step: int, field: FieldRef, scale: float=1.0) -> Figure: ...
@overloaddef plot_deformed_field(result: Result, /, *, field: FieldRef, scale: float=1.0) -> Figure: ...plot_scalar_field
Section titled “plot_scalar_field”Plot a vertex field or a derived per-cell scalar from a Result.
@overloaddef plot_scalar_field(trajectory: Trajectory, /, *, step: int, field: FieldRef | DerivedFieldSnapshot) -> Figure: ...
@overloaddef plot_scalar_field(result: Result, /, *, field: FieldRef) -> Figure: ...