Python源码示例:pyqtgraph.opengl.GLSurfacePlotItem()

示例1
def surface(self, name, x, y, z, colors, alphas=1.0):
        colors = _extend_color_if_necessary(colors, list(z.shape), alphas)
        if name not in self._named_items:
            w_gl_item = gl.GLSurfacePlotItem(
                x=x, y=y, z=z, shader=None, colors=colors, glOptions='translucent')
            self._named_items[name] = w_gl_item
            self.addItem(w_gl_item)
        else:
            self._named_items[name].setData(
                x=x, y=y, z=z, colors=colors) 
示例2
def surface(self, name, x, y, z, colors, alphas=1.0):
        colors = _extend_color_if_necessary(colors, list(z.shape), alphas)
        if name not in self._named_items:
            w_gl_item = gl.GLSurfacePlotItem(
                x=x, y=y, z=z, shader=None, colors=colors, glOptions='translucent')
            self._named_items[name] = w_gl_item
            self.addItem(w_gl_item)
        else:
            self._named_items[name].setData(
                x=x, y=y, z=z, colors=colors)