pylbo.visualisation.spectra.spectrum_figure

Module Contents

Classes

SpectrumFigure

Class to handle the creation of a figure window dedicated to different types of

class pylbo.visualisation.spectra.spectrum_figure.SpectrumFigure(custom_figure: tuple[matplotlib.figure.Figure, matplotlib.axes.Axes] = None, figlabel: str = None, figsize: tuple[int, int] = None)[source]

Bases: pylbo.visualisation.figure_window.InteractiveFigureWindow

Class to handle the creation of a figure window dedicated to different types of spectrum figures.

Parameters:
  • custom_figure (tuple[Figure, Axes]) – A custom figure to use, in the form (fig, ax) corresponding to the figure and axis objects from matplotlib.

  • figlabel (str) – The label of the figure, used to generate a unique figure id

  • figsize (tuple[int, int]) – The size of the figure, default is (10, 6).

ax

The axes object.

Type:

Axes

x_scaling

The scaling of the x-axis.

Type:

int, float, complex, np.ndarray

y_scaling

The scaling of the y-axis.

Type:

int, float, complex, np.ndarray

property c_handler[source]

Property, returns the continua handler.

property ef_handler[source]

Property, returns the eigenfunction handler.

property ef_ax[source]

Property, returns the eigenfunction axes.

draw()[source]

Called on plot refreshing, the super call clears the figure and then redraws everything.

set_x_scaling(x_scaling)[source]

Sets the x scaling.

Parameters:

x_scaling (int, float, complex, numpy.ndarray) – The scaling to apply to the x-axis.

set_y_scaling(y_scaling)[source]

Sets the y scaling.

Parameters:

y_scaling (int, float, complex, numpy.ndarray) – The scaling to apply to the y-axis

_set_plot_properties(properties)[source]

Sets all relevant plot properties.

Parameters:

properties (dict) – Dictionary containing the usual matplotlib properties (marker, color, markersize, alpha, etc.)

abstract add_spectrum()[source]
abstract add_continua(interactive)[source]
abstract add_eigenfunctions()[source]
abstract add_derived_eigenfunctions()[source]
has_valid_continua(data)[source]