Hello. Can I use pyplot functions (such as pyplot.plot, pyplot.pcolormesh) to plot in embedded Qt plot? I have created the following class
class CDeltaHPlot(FigureCanvasQTAgg): def __init__(self, parent = None): self.figure = Figure() self.axes = self.figure.add_subplot(111) FigureCanvasQTAgg.__init__(self, self.figure) self.setParent(parent) FigureCanvasQTAgg.setSizePolicy(self, QSizePolicy.Expanding, QSizePolicy.Expanding) FigureCanvasQTAgg.updateGeometry(self) self.plot() def plot(self): pyplot.sca(self.axes) But it throws the following exception: File "/opt/develop/lib/python3.4/site-packages/matplotlib-1.4.0-py3.4-linux-x8 6_64.egg/matplotlib/pyplot.py", line 806, in sca raise ValueError("Axes instance argument was not found in a figure.") ValueError: Axes instance argument was not found in a figure. Kind regards, Petr. ------------------------------------------------------------------------------ Slashdot TV. Videos for Nerds. Stuff that Matters. http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users