photons.plotting module
Plot widget.
- class photons.plotting.BaseTable(rows=0, header=None, parent=None, tooltip=None)[source]
Bases:
QTableWidgetCustom table that has text-selectable, read-only cells.
- class photons.plotting.BaseTableDelegate(parent)[source]
Bases:
QItemDelegateAllows for a table cell to be selectable and read only.
- createEditor(parent, option, index)[source]
Overrides
QtWidgets.QAbstractItemDelegate.createEditor().- Return type:
- class photons.plotting.LogTable(log_dataset, title)[source]
Bases:
BaseTableDisplay the logging records in a table.
-
COLORS:
dict[str,QColor] = {'CRITICAL': PySide6.QtGui.QColor.fromRgbF(1.000000, 0.000000, 0.000000, 1.000000), 'DEBUG': PySide6.QtGui.QColor.fromRgbF(0.466667, 0.533333, 0.600000, 1.000000), 'ERROR': PySide6.QtGui.QColor.fromRgbF(0.545098, 0.000000, 0.000000, 1.000000), 'INFO': PySide6.QtGui.QColor.fromRgbF(0.000000, 0.000000, 0.000000, 1.000000), 'NOTSET': PySide6.QtGui.QColor.fromRgbF(1.000000, 1.000000, 1.000000, 1.000000), 'WARNING': PySide6.QtGui.QColor.fromRgbF(0.721569, 0.525490, 0.043137, 1.000000)}
-
COLORS:
- class photons.plotting.MetadataTable(tooltip=None)[source]
Bases:
BaseTableDisplay metadata in a table.
- class photons.plotting.Plot(root=None, parent=None, **kwargs)[source]
Bases:
QWidgetA widget for plotting 2D data and displaying metadata.
- Parameters:
- dragEnterEvent(event)[source]
Overrides
QtWidgets.QWidget.dragEnterEvent().- Return type:
- dropEvent(event)[source]
Overrides
QtWidgets.QWidget.dropEvent().- Return type:
- class photons.plotting.ScatterPlot(parent)[source]
Bases:
QWidgetA scatter-plot for a 2D dataset.
- class photons.plotting.RealTimePlot(*, error_options=None, plot_options=None, signaler=None, size=10000, title=None)[source]
Bases:
QWidgetPlot data in real time.
- Parameters:
error_options (
dict) – Options passed toErrorBarItem. If not specified, default options are used.plot_options (
dict) – Options passed toPlotItem. If not specified, default options are used.signaler (
SignalInstance) – The Qt signal that emitsSamples.size (
int) – The maximum number of data points that can be shown. When the number of data points exceeds this value the latest data point is shown and the oldest data point is removed.title (
str) – The text to display in the titlebar of the widget.
-
closing:
SignalInstance Emitted when the widget closes.
- update(samples)[source]
Update the plot.
If a signaler is specified when this class is instantiated, this method (slot) is called automatically when the signaler emits the samples.
- closeEvent(event)[source]
Overrides
QtWidgets.QWidget.closeEvent().Disconnect from the signaler (if one was specified), removes items from the plot and emits the
closingsignal.- Return type: