def add_plot(self, iplt, irow, icol): widget = ImageWidget(self, "Plot #%d" % (iplt + 1)) widget.setMinimumSize(200, 150) xdata = np.linspace(-10, 10) ydata = np.sin(xdata + np.random.randint(0, 100) * 0.01 * np.pi) curve_item = make.curve(xdata, ydata, color="b") widget.plot.add_item(curve_item) self.layout().addWidget(widget, irow, icol, 1, 1)