mpl_qt_viz.visualizers.PlotNd

class mpl_qt_viz.visualizers.PlotNd(data, names=None, initialCoords=None, title='', parent=None, indices=None, flags=1)[source]

Bases: PyQt5.QtWidgets.QWidget

A convenient widget for visualizing data that is 3D or greater. This is a standalone widget which extends the functionality of PlotNdCanvas.

Parameters
  • data (ndarray) – A 3D or greater numpy array of numeric values.

  • names (Optional[Tuple[str, …]]) – A sequence of labels for each axis of the data array.

  • initialCoords (Optional[Tuple[int, …]]) – An optional sequence of the coordinates to initially se the ND crosshair to. There should be one coordinate for each axis of the data array.

  • title (Optional[str]) – A title for the window.

  • parent (Optional[QWidget]) – The Qt Widget that serves as the parent for this widget.

  • indices (Optional[Sequence[ndarray]]) – An optional tuple of 1d arrays of values to set as the indexes for each dimension of the data. Elements of the list can be set to None to skip setting a custom index for that dimension.

  • flags – See the flags constructor argument for a QWidget. Default value is Window

data

A reference to the 3D or greater numpy array. This can be safely modified.

setColorMap(cmap)[source]

Set the colormap used to display data.

Parameters

cmap (Union[str, Colormap]) – This value will be have the same effect as the argument of Matplotlib’s AxesImage.set_cmap()

setLimits(Min, Max)[source]

Set the limits of the colormap.

Parameters
  • Min (float) – The data value that will correspond to the minimum of the colormap.

  • Max (float) – The data value that will correspond to the maximum of the colormap.