ScatterPlotWidget

class pyqtgraph.ScatterPlotWidget(parent=None)[source]

This is a high-level widget for exploring relationships in tabular data.

Given a multi-column record array, the widget displays a scatter plot of a specific subset of the data. Includes controls for selecting the columns to plot, filtering data, and determining symbol color and shape.

The widget consists of four components:

  1. A list of column names from which the user may select 1 or 2 columns to plot. If one column is selected, the data for that column will be plotted in a histogram-like manner by using pseudoScatter(). If two columns are selected, then the scatter plot will be generated with x determined by the first column that was selected and y by the second.

  2. A DataFilter that allows the user to select a subset of the data by specifying multiple selection criteria.

  3. A ColorMap that allows the user to determine how points are colored by specifying multiple criteria.

  4. A PlotWidget for displaying the data.

__init__(parent=None)[source]
setData(data)[source]

Set the data to be processed and displayed. Argument must be a numpy record array.

setFields(fields, mouseOverField=None)[source]

Set the list of field names/units to be processed.

The format of fields is the same as used by ColorMapWidget.setFields

setSelectedIndices(inds)[source]

Mark the specified indices as selected.

Must be a sequence of integers that index into the array given in setData().

setSelectedPoints(points)[source]

Mark the specified points as selected.

Must be a list of points as generated by the sigScatterPlotClicked signal.