plot.py 文件源码

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

项目:CElegansBehaviour 作者: ChristophKirst 项目源码 文件源码
def __init__(self, data, title = None, color = 'viridis', ncolors = None):
    #self.app = pg.QtGui.QApplication([])
    #self.win = pg.GraphicsLayoutWidget()
    #self.win.resize(1200, 800)
    lut = colormap_lut(color, ncolors);

    self.img = pg.ImageItem()
    self.img.setLookupTable(lut)
    self.img.setLevels([0,1])        

    #self.plot = self.win.addPlot()
    self.plot = pg.plot(title = title);
    self.plot.addItem(self.img)

    #self.timer = QtCore.QTimer()
    #self.timer.timeout.connect(self.check_for_new_data_and_replot)
    #self.timer.start(100)
    self.img.setImage(data.T)
    #self.win.show()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号