def __init__(self, parent=None, x=[], y=[], data=[]): QWidget.__init__(self, parent) if len(x) < 2: x = np.linspace(0, 1392, 1392) y = np.linspace(0, 1040, 1040) data = np.zeros((1040, 1392)) self.x = x self.y = y self.data = data sx = 600 sy = int(sx / 1.338) stretch_x = 3 stretch_y = 3 #self.setGeometry(QRect(0,0,sx,sy)) layout = QGridLayout(self) layout.setMargin(0) self.screen = ImageScreen(self, x, y, data) self.cutX = CutScreen(self) self.cutY = CutScreen(self) layout.addWidget(self.screen, 1, 0) layout.addWidget(self.cutX, 0, 0) layout.addWidget(self.cutY, 1, 1) layout.setColumnStretch(0, stretch_x) layout.setColumnStretch(1, 1) layout.setRowStretch(0, 1) layout.setRowStretch(1, stretch_y) self.setLayout(layout) self.updateGeometry() self.manager = PlotManager(self) self.manager.add_plot(self.screen.plot) self.manager.add_plot(self.cutX.plot) self.manager.add_plot(self.cutY.plot) #roi = ROISelectTool #bkgnd = BKGNDSelectTool self.tools = [tools.SelectTool, tools.RectZoomTool, tools.ColormapTool] self.manager.register_all_curve_tools()