def __init__(self, points, title = None):
pg.mkQApp();
self.w = gl.GLViewWidget()
self.w.opts['distance'] = 20
self.w.show()
self.w.setWindowTitle(title)
self.g = gl.GLGridItem()
self.w.addItem(self.g)
self.sp = gl.GLScatterPlotItem(pos=points, color=(1,1,1,1), pxMode= True)
self.w.addItem(self.sp);
#self.plot.addItem(self.w);
#
### create three grids, add each to the view
#xgrid = gl.GLGridItem()
#ygrid = gl.GLGridItem()
#zgrid = gl.GLGridItem()
#view.addItem(xgrid)
#view.addItem(ygrid)
#view.addItem(zgrid)
#
### rotate x and y grids to face the correct direction
#xgrid.rotate(90, 0, 1, 0)
#ygrid.rotate(90, 1, 0, 0)
#
### scale each grid differently
#xgrid.scale(0.2, 0.1, 0.1)
#ygrid.scale(0.2, 0.1, 0.1)
#zgrid.scale(0.1, 0.2, 0.1)
评论列表
文章目录