phase
plot.phase
Phase-space trajectory and vector-field plots for SimulationResult.
Functions
| Name | Description |
|---|---|
| plot_phase | 2D phase-space trajectory colored by time. |
| plot_vector_field | Vector field (streamplot or quiver) from the dynamics RHS. |
plot_phase
plot.phase.plot_phase(
result,
x_var=None,
y_var=None,
region=0,
mode=0,
ax=None,
colorbar=True,
**kwargs,
)2D phase-space trajectory colored by time.
Parameters
result : SimulationResult x_var, y_var : str, optional Variable names for x/y axes. Defaults to first two. region, mode : int Index selection when node/mode dims exist. ax : matplotlib.axes.Axes, optional colorbar : bool Show time colorbar. **kwargs Forwarded to ax.scatter().
Returns
matplotlib.figure.Figure or None
plot_vector_field
plot.phase.plot_vector_field(
result,
x_var=None,
y_var=None,
region=0,
mode=0,
grid_n=20,
ax=None,
stream=True,
trajectory=True,
**kwargs,
)Vector field (streamplot or quiver) from the dynamics RHS.
Requires result to carry a reference to the source experiment (via ExperimentResult.source) so the dynamics equations are available.
Parameters
result : SimulationResult x_var, y_var : str, optional region, mode : int grid_n : int Grid resolution per axis. ax : matplotlib.axes.Axes, optional stream : bool If True use streamplot, otherwise quiver. trajectory : bool Overlay the simulation trajectory. **kwargs Forwarded to streamplot / quiver.