GLSurfacePlotItem — pyqtgraph 0.9.8 documentation

### Navigation

- index
- modules |
- next |
- previous |
- pyqtgraph 0.9.8 documentation »
- API Reference »
- Pyqtgraph’s 3D Graphics System »

# GLSurfacePlotItem

class `pyqtgraph.opengl.` `GLSurfacePlotItem`(x=None, y=None, z=None, colors=None, **kwds)

  Bases: `GLMeshItem`

  Displays a surface plot on a regular x,y grid

  `__init__`(x=None, y=None, z=None, colors=None, **kwds)

    The x, y, z, and colors arguments are passed to setData(). All other keyword arguments are passed to GLMeshItem.__init__().

  `setData`(x=None, y=None, z=None, colors=None)

    Update the data in this surface plot.

    Arguments |
    x,y | 1D arrays of values specifying the x,y positions of vertexes in the grid. If these are omitted, then the values will be assumed to be integers.
    z | 2D array of height values for each grid vertex.
    colors | (width, height, 4) array of vertex colors.

    All arguments are optional.

    Note that if vertex positions are updated, the normal vectors for each triangle must be recomputed. This is somewhat expensive if the surface was initialized with smooth=False and very expensive if smooth=True. For faster performance, initialize with computeNormals=False and use per-vertex colors or a normal-independent shader program.

### Navigation

- index
- modules |
- next |
- previous |
- pyqtgraph 0.9.8 documentation »
- API Reference »
- Pyqtgraph’s 3D Graphics System »