On Mon, Dec 15, 2008 at 9:44 AM, John Hunter <jdh2...@gmail.com> wrote:
> By default matplotlib overplots, so every time you call plot a new > line is added to the canvas. You can turn this behavior off using the > hold method Sorry, on second look it appears you have a more serious problem. Typically you want to create your figure and canvas just once and add it to your GUI. And then when the user clicks plot, just draw to the existing axes def __init__(): self.figure = some code self.canvas = some code self.axes = some code def onclick(self): self.axes.cla() # clear if you want self.axes.plot(something) Ie, you want to reuse the same figure/canvas/axes instead of recreating them all the time ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users