plotting.plot_spectrum
plotting.plot_spectrum(
freqs,
growth_rates,
*,
residuals=None,
contour=None,
freq_unit='Hz',
title='Eigenmode spectrum',
**layout,
)Plot the stability spectrum: growth rate versus modal frequency.
Each mode is a marker at (frequency, growth rate); the dashed line at growth = 0 is the stability boundary, with growing (unstable) modes above it drawn in a contrasting colour.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| freqs | array_like | Modal frequencies (Hz), shape (n_modes,). |
required |
| growth_rates | array_like | Growth rates -Im(omega) (1/s); positive is unstable. |
required |
| residuals | array_like | Per-mode validation residual, shown in the hover text. | None |
| contour | Contour or sequence | The search contour(s) the modes were found in (a :class:~nefes.perturbation.stability.contour.Contour, a list of them, or an array of complex omega nodes). Drawn as a closed outline so one can see the searched region around the eigenvalues. |
None |
| freq_unit | str | Frequency-axis unit label (default "Hz"). |
'Hz' |
| title | str | Figure title. | 'Eigenmode spectrum' |
| **layout | Forwarded to Figure.update_layout. |
{} |
Returns
| Name | Type | Description |
|---|---|---|
| plotly.graph_objects.Figure |