pylbo.visualisation.spectra.spectrum_single
Classes
Creates a plot of a single spectrum based on a given dataset. |
Module Contents
- class pylbo.visualisation.spectra.spectrum_single.SingleSpectrumPlot(dataset, figsize, custom_figure, use_residuals, **kwargs)[source]
Bases:
pylbo.visualisation.spectra.spectrum_figure.SpectrumFigure
Creates a plot of a single spectrum based on a given dataset.
- Parameters:
dataset (LegolasDataSet) – The dataset used to create the spectrum.
figsize (tuple) – Figure size used when creating a window, analogous to matplotlib.
custom_figure (tuple) – The custom figure to use in the form (fig, axes).
use_residuals (bool) – If True, colors the spectrum points based on the residuals.
- w_real
Real part of the eigenvalues as a numpy array.
- Type:
numpy.ndarray(dtype=float, ndim=1)
- w_imag
Imaginary part of the eigenvalues as a numpy array.
- Type:
numpy.ndarray(dtype=float, ndim=1)
- add_continua(interactive=True)[source]
Adds the continua to the spectrum.
- Parameters:
interactive (bool) – If True, makes the legend pickable.
- Returns:
c_handler – The legendhandler used to plot the continua.
- Return type:
ContinuaHandler
- draw_resonances()[source]
In case the (derived) eigenfunctions are added to the plot, the locations of resonance with the continua will also be drawn. Does nothing if the (derived) eigenfunctions are not shown.
- _get_colors() numpy.ndarray [source]
Returns the colors for the spectrum points.