UML class diagram
The UML class diagram below gives an overview of the most important classes and their relations.
The green boxes represent Qt classes, the purple boxes are PyQtGraph classes.
The black arrows indicate inheritance between two classes (with the parent class always above the child classes.)
The gray lines with the diamonds indicate an aggregation relation. For example the PlotDataItem
class has a curve
attribute that is a reference to a PlotCurveItem
object.
ImageView
graphicsView
imageItem
view
QGraphicsView
scene()
QGraphicsScene
items()
views()
QGraphicsItem
scene()
QGraphicsObject
GraphicsView
sceneObj
GraphicsObject
ScatterPlotItem
PlotCurveItem
ImageItem
PlotDataItem
curve
scatter
GraphicsLayoutWidget
graphicsLayout
GraphicsItem
QGraphicsLayoutItem
QGraphicsWidget
QGraphicsLayout
QGraphicsGridLayout
PlotWidget
plotItem
GraphicsScene
GraphicsWidget
ViewBox
addItem(item)
GraphicsLayout
layout
PlotItem
items
layout
vb
addItem(item)
QPaintDevice
QWidget
QObject
Widget used for display and analysis of image data.
The QGraphicsView class provides a widget for
displaying the contents of a QGraphicsScene.
The QGraphicsScene class provides a surface for
managing a large number of 2D graphical items.
The QGraphicsItem class is the base class for all
graphical items in a QGraphicsScene.
The QGraphicsObject class provides a base class for all
graphics items that require signals, slots and properties.
Re-implementation of QGraphicsView that removes scrollbars and allows
unambiguous control of the viewed coordinate range.
Also automatically creates a GraphicsScene and a central QGraphicsWidget
that is automatically scaled to the full view geometry.
Extension of QGraphicsObject with some useful
methods (provided by GraphicsItem)
Displays a set of x/y points.
Instances of this class are created automatically as part of
PlotDataItem; these rarely need to be instantiated directly.
Class representing a single plot curve.
Instances of this class are created automatically as part of
PlotDataItem; these rarely need to be instantiated directly.
GraphicsObject displaying an image.
GraphicsItem for displaying plot curves, scatter plots, or both.
While it is possible to use PlotCurveItem or ScatterPlotItem
individually, this class provides a unified interface to both.
Convenience class consisting of a GraphicsView with a
single GraphicsLayout as its central item.
Most of the methods provided by GraphicsLayout are
also available through GraphicsLayoutWidget.
Abstract class providing useful methods to GraphicsObject
and GraphicsWidget. (This is required because we cannot
have multiple inheritance with QObject subclasses.)
The QGraphicsLayoutItem class can
be inherited to allow your custom
items to be managed by layouts.
The QGraphicsWidget class is the base class for
all widget items in a QGraphicsScene.
The QGraphicsLayout class provides
the base class for all layouts in
Graphics View.
The QGraphicsGridLayout class provides
a grid layout for managing widgets in
Graphics View.
A subclass of GraphicsView with a single PlotItem displayed.
Most of the methods provided by PlotItem are also available
through PlotWidget.
Extension of QGraphicsScene that implements a
complete, parallel mouse event system.
Extends QGraphicsWidget with several helpful methods and
workarounds for PyQt bugs.
Most of the extra functionality is inherited from GraphicsItem.
Box that allows internal scaling/panning of children by mouse drag.
addItem() will add a graphics item (e.g. a PlotDataItem) to the scene.
This class is usually created automatically as part of a PlotItem or
Canvas or with GraphicsLayout.addViewBox().
Used for laying out GraphicsWidgets
in a grid.
This is usually created automatically
as part of a GraphicsWindow or
GraphicsLayoutWidget.
GraphicsWidget implementing a standard 2D plotting
area with axes.
addItem() will call ViewBox.addItem(), which will add
the graphics item to the scene.
The QPaintDevice class is the base class of objects that
can be painted on with QPainter.
The QWidget class is the base class of all user interface objects.
The QObject class is the base class of all Qt objects.
ImageView
graphicsView
imageItem
view
QGraphicsView
scene()
QGraphicsScene
items()
views()
QGraphicsItem
scene()
QGraphicsObject
GraphicsView
sceneObj
GraphicsObject
ScatterPlotItem
PlotCurveItem
ImageItem
PlotDataItem
curve
scatter
GraphicsLayoutWidget
graphicsLayout
GraphicsItem
QGraphicsLayoutItem
QGraphicsWidget
QGraphicsLayout
QGraphicsGridLayout
PlotWidget
plotItem
GraphicsScene
GraphicsWidget
ViewBox
addItem(item)
GraphicsLayout
layout
PlotItem
items
layout
vb
addItem(item)
QPaintDevice
QWidget
QObject
Widget used for display and analysis of image data.
The QGraphicsView class provides a widget for
displaying the contents of a QGraphicsScene.
The QGraphicsScene class provides a surface for
managing a large number of 2D graphical items.
The QGraphicsItem class is the base class for all
graphical items in a QGraphicsScene.
The QGraphicsObject class provides a base class for all
graphics items that require signals, slots and properties.
Re-implementation of QGraphicsView that removes scrollbars and allows
unambiguous control of the viewed coordinate range.
Also automatically creates a GraphicsScene and a central QGraphicsWidget
that is automatically scaled to the full view geometry.
Extension of QGraphicsObject with some useful
methods (provided by GraphicsItem)
Displays a set of x/y points.
Instances of this class are created automatically as part of
PlotDataItem; these rarely need to be instantiated directly.
Class representing a single plot curve.
Instances of this class are created automatically as part of
PlotDataItem; these rarely need to be instantiated directly.
GraphicsObject displaying an image.
GraphicsItem for displaying plot curves, scatter plots, or both.
While it is possible to use PlotCurveItem or ScatterPlotItem
individually, this class provides a unified interface to both.
Convenience class consisting of a GraphicsView with a
single GraphicsLayout as its central item.
Most of the methods provided by GraphicsLayout are
also available through GraphicsLayoutWidget.
Abstract class providing useful methods to GraphicsObject
and GraphicsWidget. (This is required because we cannot
have multiple inheritance with QObject subclasses.)
The QGraphicsLayoutItem class can
be inherited to allow your custom
items to be managed by layouts.
The QGraphicsWidget class is the base class for
all widget items in a QGraphicsScene.
The QGraphicsLayout class provides
the base class for all layouts in
Graphics View.
The QGraphicsGridLayout class provides
a grid layout for managing widgets in
Graphics View.
A subclass of GraphicsView with a single PlotItem displayed.
Most of the methods provided by PlotItem are also available
through PlotWidget.
Extension of QGraphicsScene that implements a
complete, parallel mouse event system.
Extends QGraphicsWidget with several helpful methods and
workarounds for PyQt bugs.
Most of the extra functionality is inherited from GraphicsItem.
Box that allows internal scaling/panning of children by mouse drag.
addItem() will add a graphics item (e.g. a PlotDataItem) to the scene.
This class is usually created automatically as part of a PlotItem or
Canvas or with GraphicsLayout.addViewBox().
Used for laying out GraphicsWidgets
in a grid.
This is usually created automatically
as part of a GraphicsWindow or
GraphicsLayoutWidget.
GraphicsWidget implementing a standard 2D plotting
area with axes.
addItem() will call ViewBox.addItem(), which will add
the graphics item to the scene.
The QPaintDevice class is the base class of objects that
can be painted on with QPainter.
The QWidget class is the base class of all user interface objects.
The QObject class is the base class of all Qt objects.