8.5.5.1.4. pymodaq_gui.plotting.data_viewers.viewer1D module
- class pymodaq_gui.plotting.data_viewers.viewer1D.DataDisplayer(plotitem: ~pyqtgraph.graphicsItems.PlotItem.PlotItem.PlotItem, flip_axes=False, plot_colors=<pymodaq_utils.utils.PlotColors object>)[source]
Bases:
QObjectThis Object deals with the display of 1D data on a plotitem
- Attributes:
- Ndata
- labels
- legend
Methods
get_axis
get_plot_item
get_plot_items
labels_changed
legend_items
plot_with_scatter
show_overlay
update_axis
update_colors
update_data
update_display_items
update_errors
update_plot
update_scatter
update_sort
update_xy
update_xyplot
updated_item
- update_data(data: DataRaw, do_xy=False, sort_data=False, force_update=False, do_scatter=False, show_errors=False)[source]
- update_display_items(data: DataWithAxes = None, show_errors=False)[source]
- update_xyplot(do_xy=True, dwa: DataWithAxes = None)[source]
- property Ndata
- property labels
- labels_changed
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- property legend
- updated_item
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- class pymodaq_gui.plotting.data_viewers.viewer1D.View1D(parent_widget: QWidget = None, show_toolbar=True, no_margins=False, flip_axes=False)[source]
Bases:
ActionManager,QObject- Attributes:
axisGet the current axis used to display data
- plotitem
Methods
Convenience function from the Crosshair
Convenience function from the Crosshair
Uncheck things if xyplot is active
set_crosshair_position(*positions)Convenience function from the Crosshair
Method where to create actions to be subclassed.
update_roi_channels(roi_name)Update the use_channel setting each time a ROI is added
add_data_displayer
add_plot_item
add_roi_displayer
connect_things
display_data
display_roi_lineouts
do_math
get_double_clicked
lock_aspect_ratio
move_roi_target
prepare_ui
remove_data_displayer
remove_roi_displayer
setup_widgets
show_ROI_select
show_hide_crosshair
update_colors
update_crosshair_data
- add_data_displayer(displayer_name: str, plot_colors=<pymodaq_utils.utils.PlotColors object>)[source]
- display_data(data: DataWithAxes | DataToExport, displayer: str = None)[source]
- display_roi_lineouts(roi_dte: DataToExport)[source]
- setup_actions()[source]
Method where to create actions to be subclassed. Mandatory
Examples
>>> self.add_action('Quit', 'close2', "Quit program") >>> self.add_action('Grab', 'camera', "Grab from camera", checkable=True) >>> self.add_action('Load', 'Open', "Load target file (.h5, .png, .jpg) or data from camera", checkable=False) >>> self.add_action('Save', 'SaveAs', "Save current data", checkable=False)
See also
ActionManager.add_action
- update_crosshair_data(crosshair_dte: DataToExport)[source]
- property axis
Get the current axis used to display data
- property plotitem
- class pymodaq_gui.plotting.data_viewers.viewer1D.Viewer1D(parent: QWidget = None, title='', show_toolbar=True, no_margins=False, flip_axes=False)[source]
Bases:
ViewerBaseDataWithAxis of type Data1D can be plotted using this data viewer
- show_data:
parameter: * dwa: a DataWithaxis * scatter_dwa: an optional extra DataWithAxis to be plotted with scatter points
it could define extra_attributes such as symbol: str (to define the symbol layout default: ‘o’) and symbol_size: int (to define the symbol size)
- Attributes:
crosshairConvenience method
- labels
roi_managerConvenience method
roi_targetTo be implemented if necessary (Viewer1D and above)
Methods
activate_roi([activate])Activate the Roi manager using the corresponding action
move_roi_target([pos])move a specific read only ROI at the given position on the viewer
set_crosshair_position(xpos[, ypos])Convenience method to set the crosshair positions
add_plot_item
crosshair_changed
double_clicked
get_axis_from_view
prepare_connect_ui
process_crosshair_lineouts
process_roi_lineouts
roi_changed
selected_region_changed
update_colors
update_status
- get_axis_from_view(data: DataWithAxes)[source]
- move_roi_target(pos: Iterable[float] = None)[source]
move a specific read only ROI at the given position on the viewer
- process_crosshair_lineouts(crosshair_dte: DataToExport)[source]
- process_roi_lineouts(roi_dte: DataToExport)[source]
- property crosshair
Convenience method
- property labels
- property roi_manager
Convenience method
- property roi_target: InfiniteLine
To be implemented if necessary (Viewer1D and above)