GraphicsView

class pyqtgraph.GraphicsView(parent=None, useOpenGL=None, background='k')
__init__(parent=None, useOpenGL=None, background='k')

Re-implementation of QGraphicsView that removes scrollbars and allows unambiguous control of the viewed coordinate range. Also automatically creates a QGraphicsScene and a central QGraphicsWidget that is automatically scaled to the full view geometry.

By default, the view coordinate system matches the widget’s pixel coordinates and automatically updates when the view is resized. This can be overridden by setting autoPixelRange=False. The exact visible range can be set with setRange().

The view can be panned using the middle mouse button and scaled using the right mouse button if enabled via enableMouse().

pixelSize()

Return vector with the length and width of one view pixel in scene coordinates

scaleToImage(image)

Scales such that pixels in image are the same size as screen pixels. This may result in a significant performance increase.

setCentralWidget(item)

Sets a QGraphicsWidget to automatically fill the entire view.

viewRect()

Return the boundaries of the view in scene coordinates

Previous topic

FileDialog

Next topic

JoystickButton

This Page