def setup(self): self.ui = self.graph_layout = pg.GraphicsLayoutWidget() self.plot = self.graph_layout.addPlot() self.plotdata = self.plot.plot()