GLViewWidget

class pyqtgraph.opengl.GLViewWidget(parent=None)[source]
Basic widget for displaying 3D data
  • Rotation/scale controls
  • Axis/grid display
  • Export options
__init__(parent=None)[source]
cameraPosition()[source]

Return current position of camera based on center, dist, elevation, and azimuth

itemsAt(region=None)[source]

Return a list of the items displayed in the region (x, y, w, h) relative to the widget.

orbit(azim, elev)[source]

Orbits the camera around the center position. azim and elev are given in degrees.

paintGL(region=None, viewport=None, useItemNames=False)[source]

viewport specifies the arguments to glViewport. If None, then we use self.opts[‘viewport’] region specifies the sub-region of self.opts[‘viewport’] that should be rendered. Note that we may use viewport != self.opts[‘viewport’] when exporting.

pan(dx, dy, dz, relative=False)[source]

Moves the center (look-at) position while holding the camera in place.

If relative=True, then the coordinates are interpreted such that x if in the global xy plane and points to the right side of the view, y is in the global xy plane and orthogonal to x, and z points in the global z direction. Distances are scaled roughly such that a value of 1.0 moves by one pixel on screen.

pixelSize(pos)[source]

Return the approximate size of a screen pixel at the location pos Pos may be a Vector or an (N,3) array of locations

readQImage()[source]

Read the current buffer pixels out as a QImage.

setBackgroundColor(*args, **kwds)[source]

Set the background color of the widget. Accepts the same arguments as pg.mkColor() and pg.glColor().