plotting.animate_mode_shape
plotting.animate_mode_shape(
series,
*,
y_title='amplitude',
title='Mode shape',
n_frames=60,
normalize=True,
envelope=True,
**layout,
)Animate one or more spatial perturbation fields over one phase cycle.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| series | list of AnimSeries or list of PathField | The quantities to animate. A list of :class:AnimSeries overlays several variables/bases/modes (each with its own phase_ratio); a bare list of PathField is the single-quantity case (one mode, one variable). |
required |
| y_title | str | Pre-formatted y-axis title (the caller knows whether it is one variable or a mix). | 'amplitude' |
| title | str | Figure title. | 'Mode shape' |
| n_frames | int | Phase samples over [0, 2 pi) of the reference series (default 60). |
60 |
| normalize | bool | Scale each series so its peak magnitude is 1 and real at theta = 0 (default True); eigenvectors have arbitrary scale and global phase. |
True |
| envelope | bool | Draw the static +/- \|psi(x)\| band behind each animated line (default True); set False to remove the background shading. |
True |
| **layout | Forwarded to Figure.update_layout. |
{} |
Notes
Plotly has no native “loop” for animations – the play control runs through the phase frames once and stops; press it again (or drag the slider) to replay. The figure removes the cartesian modebar tools (zoom/pan/screenshot/…) by default; to also drop the plotly logo, render with fig.show(config={"displayModeBar": False}).
Returns
| Name | Type | Description |
|---|---|---|
| plotly.graph_objects.Figure | A figure carrying animation frames, a phase slider, and a play/pause control. |