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()
评论列表
文章目录