qcodespp.plotting.RemoteQtPlotWidgets
Attributes
Classes
Functions
Module Contents
- qcodespp.plotting.RemoteQtPlotWidgets.make_rgba(colorscale)
- qcodespp.plotting.RemoteQtPlotWidgets.one_rgba(c)
convert a single color value to (r, g, b, a) input can be an rgb string ‘rgb(r,g,b)’, ‘#rrggbb’ if we decide we want more we can make more, but for now this is just to convert plotly colorscales to pyqtgraph tuples
- qcodespp.plotting.RemoteQtPlotWidgets.qtapp
- class qcodespp.plotting.RemoteQtPlotWidgets.PlotTrace(*args, **kwargs)
Bases:
pyqtgraph.PlotDataItemPlotDataItem with benefits
delete() update() - check if data has been updated - call set_data() with the updated data
- setData(*args, **kwargs)
Clear any data displayed by this item and display new data.
Parameters
Raises
- TypeError
Raised when an invalid type was passed in for x or y data.
See Also
PlotDataItemThe arguments accepted by
setData()are the same used during initialization, and are listed in the opening section.arrayToQPath()Explains the constructions of the draw paths.
- update_data()
- class qcodespp.plotting.RemoteQtPlotWidgets.PlotImage(*args, **kwargs)
Bases:
pyqtgraph.ImageItemImageItem with benefits
delete() update() - check if data has been updated - call set_data() with the updated data
- x_data = None
- y_data = None
- z_data = None
- setImage(*args, **kwargs)
Update the image displayed by this ImageItem.
All keywords supported by
setOpts()are also allowed here.Parameters
- imagenp.ndarray or None, default None
Image data given as NumPy array with an integer or floating point dtype of any bit depth. A 2-dimensional array describes single-valued (monochromatic) data. A 3-dimensional array is used to give individual color components. The third dimension must be of length 3 (RGB) or 4 (RGBA).
np.nanvalues are treated as transparent pixels.- autoLevelsbool or None, default None
If
True, ImageItem will automatically select levels based on the maximum and minimum values encountered in the data. For performance reasons, this search sub-samples the images and may miss individual bright or dark points in the data set. IfFalse, the search will be omitted. IfNone, the value set bysetOpts()is used, unless alevelskeyword argument is given, which implies False.- levelSamplesint, default 65536
Only used when
autoLevels is None. When determining minimum and maximum values, ImageItem only inspects a subset of pixels no larger than this number. Setting this larger than the total number of pixels considers all values. See quickMinMax.- **kwargsdict, optional
Extra arguments that are passed to setOpts.
See Also
- quickMinMax
See this method for how levelSamples value is utilized.
pyqtgraph.functions.makeARGB()See this function for how image data is modified prior to rendering.
Notes
For backward compatibility, image data is assumed to be in column-major order (column, row) by default. However, most data is stored in row-major order (row, column). It can either be transposed before assignment
imageitem.setImage(imagedata.T)
or the interpretation of the data can be changed locally through the axisOrder keyword or by changing the imageAxisOrder global configuration option.
- update_data()
- class qcodespp.plotting.RemoteQtPlotWidgets.PlotDock(*args, **kwargs)
Bases:
pyqtgraph.dockarea.DockDock with benefits
contains a list of traces
turns on and of Hist item
setGeometry() clear() save() to_matplolib()
- theme = ((60, 60, 60), 'w')
- grid = 20
- dock_widget
- hist_item
- plot_item
- legend
- set_cmap(cmap=None, traces=None)
- add_item(*args, pen=False, **kwargs)
Shortcut to .plot_item.addItem() which also figures out 1D or 2D etc.
- set_labels(config=None)
- close()
Remove this dock from the DockArea it lives inside.
- clear()
- class qcodespp.plotting.RemoteQtPlotWidgets.QtPlot(*args, title=None, figsize=(1000, 600), figposition=None, window_title=None, theme=((60, 60, 60), 'w'), parent=None, cmap='viridis', **kwargs)
Bases:
PyQt5.QtWidgets.QWidget- theme = ((60, 60, 60), 'w')
- area
- clear()
- closeEvent(event)
Make sure all dock-widgets are deleted upon closing or during garbage- collection. Otherwise references keep plots alive forever.
- add_dock(title=None, position='right', relativeto=None)
Add a new dock to the current window.
- Args:
- title (str):
Title of the dock
- position (str):
‘bottom’, ‘top’, ‘left’, ‘right’, ‘above’, or ‘below’
- relativeto (DockWidget, int):
If relativeto is None, then the new Dock is added to fill an entire edge of the window. If relativeto is another Dock, then the new Dock is placed adjacent to it (or in a tabbed configuration for ‘above’ and ‘below’).
- add(*args, subplot=0, **kwargs)
- qcodespp.plotting.RemoteQtPlotWidgets.plot