pylbo.visualisation.spectra.spectrum_figure

Classes

SpectrumFigure

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

Module Contents

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)

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

ax
x_scaling = 1.0
y_scaling = 1.0
_c_handler = None
_ef_handler = None
_ef_ax = None
_def_handler = None
_def_ax = None
plot_props = None
marker = None
color = None
markersize = None
alpha = None
draw()

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

set_x_scaling(x_scaling)

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)

Sets the y scaling.

Parameters:

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

_set_plot_properties(properties)

Sets all relevant plot properties.

Parameters:

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

abstract add_spectrum()
abstract add_continua(interactive)
abstract add_eigenfunctions()
has_valid_continua(data)
property c_handler

Property, returns the continua handler.

property ef_handler

Property, returns the eigenfunction handler.

property ef_ax

Property, returns the eigenfunction axes.