plot.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:CElegansBehaviour 作者: ChristophKirst 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号