Re: [Matplotlib-users] Clearing A Figure (I Know That This Has Been Posted Before But I Does Not Work For Me)

2010-05-26 Thread Thistleryver
>w/o seeing the entire code it is difficult to diagnose. Nothing looks >wrong with your code. However, for full control I suggest you use the >API; see examples at >http://matplotlib.sourceforge.net/examples/api/index.html and take a >look at the "artist tutorial" at >http://matplotlib.sourcefor

Re: [Matplotlib-users] Clearing A Figure (I Know That This Has Been Posted Before But I Does Not Work For Me)

2010-05-25 Thread John Hunter
On Tue, May 25, 2010 at 4:08 AM, Thistleryver wrote: > > I am attempting to run a lot of tests automatically and generate a graph for > each one.  However, at the moment, the previous graph remains on the figure > and the next plot is drawn over it. > > I have read extensively the documentation an

[Matplotlib-users] Clearing A Figure (I Know That This Has Been Posted Before But I Does Not Work For Me)

2010-05-25 Thread Thistleryver
I am attempting to run a lot of tests automatically and generate a graph for each one. However, at the moment, the previous graph remains on the figure and the next plot is drawn over it. I have read extensively the documentation and I have tried a whole lot of different commands but to no avail

Re: [Matplotlib-users] clearing a figure

2007-03-18 Thread Fernando Perez
On 1/11/07, belinda thom <[EMAIL PROTECTED]> wrote: > Hi, > > > With the exception of ipython -pylab, noone is forcing you to import > > *. And on the subject, Fernando, perhaps we should support a pylab > > mode in ipython which doesn't dump the pylab namespace (or maybe just > > dumps the requir

Re: [Matplotlib-users] clearing a figure

2007-01-11 Thread John Hunter
> "Christopher" == Christopher Barker <[EMAIL PROTECTED]> writes: Christopher> F1 = OOlab.Figure() F2 = OOlab.Figure() We have this: fig1 = pylab.figure() fig2 = pylab.figure() ax1 = fig.add_subplot(111) line, = ax1.plot([1,2,3]) line.set_color('green') ax1.set_title('hi mo

Re: [Matplotlib-users] clearing a figure

2007-01-11 Thread belinda thom
Hi, > With the exception of ipython -pylab, noone is forcing you to import > *. And on the subject, Fernando, perhaps we should support a pylab > mode in ipython which doesn't dump the pylab namespace (or maybe just > dumps the required figure, show, close, nx), but does the interactive > backend

Re: [Matplotlib-users] clearing a figure

2007-01-11 Thread belinda thom
so use pylab.gca() ? On Jan 11, 2007, at 3:31 PM, Christopher Barker wrote: > Jeff Whitaker wrote: > >> Chris: In the pylab interface, figure() returns a figure instance >> and >> plot(x,y) returns a list of Line2d instances. > > yes, but it's the axis instance that you are most likely to need

Re: [Matplotlib-users] clearing a figure

2007-01-11 Thread Christopher Barker
Jeff Whitaker wrote: > Chris: Never noticed this before, but apparently the parent axes > instance is attached to the Line2d instance: > > >>> from pylab import * > >>> l = plot([1,2,3]) > >>> l[0].axes > cool! That could be handy. thanks, -Chris -- Christopher Barker, Ph.D. Oceanogra

Re: [Matplotlib-users] clearing a figure

2007-01-11 Thread Jeff Whitaker
Christopher Barker wrote: > Jeff Whitaker wrote: > >> Chris: In the pylab interface, figure() returns a figure instance >> and plot(x,y) returns a list of Line2d instances. > > yes, but it's the axis instance that you are most likely to need! > > - Chris > > Chris: Never noticed this before, but

Re: [Matplotlib-users] clearing a figure

2007-01-11 Thread Christopher Barker
Jeff Whitaker wrote: > Chris: In the pylab interface, figure() returns a figure instance and > plot(x,y) returns a list of Line2d instances. yes, but it's the axis instance that you are most likely to need! - Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA

Re: [Matplotlib-users] clearing a figure

2007-01-11 Thread Christopher Barker
Eric Firing wrote: > I think this may be a slippery slope. The problem is that for it to > work well, there has to be a clear distinction between methods that are > endpoints, requiring a redraw, and methods that will be used by other > methods. For example, errorbar makes multiple calls to

Re: [Matplotlib-users] clearing a figure

2007-01-11 Thread Jeff Whitaker
Christopher Barker wrote: > Eric Firing wrote: > >> Even without the automatic-redraw difference, the OO interface requires >> more typing, and more mental record-keeping, than the pylab interface. >> > > Yes, but I don't think that's inherent in an OO interface, it's just > that the quic

Re: [Matplotlib-users] clearing a figure

2007-01-11 Thread Christopher Barker
Eric Firing wrote: > Even without the automatic-redraw difference, the OO interface requires > more typing, and more mental record-keeping, than the pylab interface. Yes, but I don't think that's inherent in an OO interface, it's just that the quickie utilities are missing from the current OO in

Re: [Matplotlib-users] clearing a figure

2007-01-10 Thread Eric Firing
John Hunter wrote: >> "Christopher" == Christopher Barker <[EMAIL PROTECTED]> writes: > > Christopher> However, it is the case that there is a lot of stuff > Christopher> in pylab that makes it easier to use MPL in > Christopher> interactive mode. I kind of think that's a shame. I

Re: [Matplotlib-users] clearing a figure

2007-01-10 Thread belinda thom
On Jan 10, 2007, at 4:57 PM, Eric Firing wrote: > Christopher Barker wrote: >> Eric Firing wrote: >>> This is the big difference between most pylab functions and the >>> corresponding axes or figure methods that they wrap: the pylab >>> functions automatically take care of redrawing the figure if

Re: [Matplotlib-users] clearing a figure

2007-01-10 Thread Eric Firing
Christopher Barker wrote: > Eric Firing wrote: >> This is the big difference between most pylab functions and the >> corresponding axes or figure methods that they wrap: the pylab >> functions automatically take care of redrawing the figure if you are >> in an interactive mode. > > Now I feel b

Re: [Matplotlib-users] clearing a figure

2007-01-10 Thread Christopher Barker
John Hunter wrote: > It's currently implemented in pylab but could be moved up to the OO > layer by doing something like > > class Axes: >def plot(self, *args, **kwargs): >...plot something >if rcParams['interactive']: > self.figure.canvas.draw() > > or by providin

Re: [Matplotlib-users] clearing a figure

2007-01-10 Thread John Hunter
> "Christopher" == Christopher Barker <[EMAIL PROTECTED]> writes: Christopher> However, it is the case that there is a lot of stuff Christopher> in pylab that makes it easier to use MPL in Christopher> interactive mode. I kind of think that's a shame. I Christopher> don't think

Re: [Matplotlib-users] clearing a figure

2007-01-10 Thread Christopher Barker
Eric Firing wrote: > This is the big difference between most pylab functions and the > corresponding axes or figure methods that they wrap: the pylab functions > automatically take care of redrawing the figure if you are in an > interactive mode. Now I feel bad -- I think I encouraged Belinda t

Re: [Matplotlib-users] clearing a figure

2007-01-10 Thread Mark Bakker
Will appear on same figure clf() # Clears entire figure (back to what you had with figure() ) Mark Message: 10 Date: Tue, 09 Jan 2007 19:50:15 -0800 From: belinda thom <[EMAIL PROTECTED]> Subject: [Matplotlib-users] clearing a figure To: matplotlib-users Message-ID: <[EMAIL PROTECTED]

Re: [Matplotlib-users] clearing a figure

2007-01-09 Thread Eric Firing
belinda thom wrote: > One of the reasons I'm confused is b/c when I poked around, I found a > clear method: > > >>> help(pylab.gcf().clear) > Help on method clear in module matplotlib.figure: > > clear(self) method of matplotlib.figure.Figure instance > Clear the figure > > but when I ex

Re: [Matplotlib-users] clearing a figure

2007-01-09 Thread belinda thom
One of the reasons I'm confused is b/c when I poked around, I found a clear method: >>> help(pylab.gcf().clear) Help on method clear in module matplotlib.figure: clear(self) method of matplotlib.figure.Figure instance Clear the figure but when I execute this on my open figure: >>>pylab

[Matplotlib-users] clearing a figure

2007-01-09 Thread belinda thom
Hello, I'm a new matplotlib user, coming from the Matlab end. Is there a standard way to create a figure (here I'd like the equivalent of matlab's hold on, so I can draw multiple things) and then clear the figure (so the drawing goes away) so I can repeat the process again? The commands to