spinetoolbox.widgets.plot_widget
A Qt widget showing a toolbar and a matplotlib plotting canvas.
Module Contents
Classes
A widget that contains a toolbar and a plotting canvas. |
|
Custom QTableView class with copy and paste methods. |
|
Functions
Fills a given menu with available plot window names. |
- class spinetoolbox.widgets.plot_widget.PlotWidget(parent=None, legend_axes_position=LegendPosition.BOTTOM)[source]
Bases:
PySide6.QtWidgets.QWidget
A widget that contains a toolbar and a plotting canvas.
- canvas
the plotting canvas
- Type
- original_xy_data
unmodified data on which the plots are based
- Type
list of XYData
- Parameters
parent (QWidget, optional) – parent widget
legend_axes_position (LegendPosition) – legend axes position relative to plot axes
- _get_plot_data()[source]
Gathers plot data into a table.
- Returns
data as table
- Return type
list of list
- add_legend(handles)[source]
Adds a legend to the plot’s legend axes.
- Parameters
handles (list) – legend handles
- class spinetoolbox.widgets.plot_widget._PlotDataView(parent=None)[source]
Bases:
spinetoolbox.widgets.custom_qtableview.CopyPasteTableView
Custom QTableView class with copy and paste methods.
- class spinetoolbox.widgets.plot_widget._PlotDataWidget(rows, parent=None)[source]
Bases:
PySide6.QtWidgets.QWidget
Fills a given menu with available plot window names.
- Parameters
menu (QMenu) – menu to modify