sdynpy.core.sdynpy_data.GUIPlot

class GUIPlot(*data_to_plot, **labeled_data_to_plot)[source]

Bases: QMainWindow

An iteractive plot window allowing users to visualize data

__init__(*data_to_plot, **labeled_data_to_plot)[source]

Create a GUIPlot window to visualize data.

Multiple datasets can be overlaid by providing additional datasets as arguments. Position arguments will be labelled generically in the legend. Keyword arguments will be labelled with their keywords with _ replaced by ` `.

Note that all datasets will be reshaped so that the coordinates match the first dataset. If not all coordinates exist in subsequent datasets an error will be thrown.

Parameters
  • *data_to_plot (NDDataArray) – Data to visualize. Data passed by positional argument will be labeled generically in the legend

  • **labeled_data_to_plot (NDDataArray) – Data to visualize. Data passed by keyword argument will be labeled with its keyword

Return type

None.

Methods

__init__(*data_to_plot, **labeled_data_to_plot)

Create a GUIPlot window to visualize data.

connect_callbacks()

Connects the callback functions to events

deselect_all_complex_types_except(complex_type)

Deselects all complex types except the specified type.

selection_changed()

Called when the selected functions is changed

set_imaginary()

Sets the complex type to imaginary

set_magnitude()

Sets the complex type to magnitude

set_magnitude_phase()

Sets the complex type to magnitude and phase

set_phase()

Sets the complex type to phase

set_real()

Sets the complex type to real

set_real_imag()

Sets the complex type to real and imaginary

update()

Updates the figure in the GUIPlot

update_abscissa_log()

Updates whether the abscissa should be plotted as log scale

update_checkbox()

Disables the update button if set to auto-update

update_data(*data_to_plot, ...)

update_ordinate_log()

Updates whether the ordinate should be plotted as log scale

Attributes

connect_callbacks()[source]

Connects the callback functions to events

Return type

None.

deselect_all_complex_types_except(complex_type)[source]

Deselects all complex types except the specified type.

Makes the checkboxes in the menu act like radiobuttons

Parameters

complex_type (ComplexType) – Enumeration specifying which complex plot type is selected

Return type

None.

selection_changed()[source]

Called when the selected functions is changed

set_imaginary()[source]

Sets the complex type to imaginary

set_magnitude()[source]

Sets the complex type to magnitude

set_magnitude_phase()[source]

Sets the complex type to magnitude and phase

set_phase()[source]

Sets the complex type to phase

set_real()[source]

Sets the complex type to real

set_real_imag()[source]

Sets the complex type to real and imaginary

update()[source]

Updates the figure in the GUIPlot

Return type

None.

update_abscissa_log()[source]

Updates whether the abscissa should be plotted as log scale

update_checkbox()[source]

Disables the update button if set to auto-update

update_data(*data_to_plot, **labeled_data_to_plot)[source]
update_ordinate_log()[source]

Updates whether the ordinate should be plotted as log scale