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)[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[source]

The axes object.

Type:

Axes

x_scaling[source]

The scaling of the x-axis.

Type:

int, float, complex, np.ndarray

y_scaling[source]

The scaling of the y-axis.

Type:

int, float, complex, np.ndarray

ax[source]
x_scaling = 1.0[source]
y_scaling = 1.0[source]
_c_handler = None[source]
_ef_handler = None[source]
_ef_ax = None[source]
_def_handler = None[source]
_def_ax = None[source]
plot_props = None[source]
marker = None[source]
color = None[source]
markersize = None[source]
alpha = None[source]
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]
has_valid_continua(data)[source]
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.