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
On Tue, May 25, 2010 at 4:08 AM, Thistleryver mhar...@ec.auckland.ac.nz 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
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 quickie
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
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
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 apparently
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
matplotlib.axes.Subplot instance at 0x3240e90
cool! That could be handy.
thanks,
-Chris
--
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
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 mom')
Yes,
Belinda -
The hold state is on by default when you use pylab. To clear a figure you
use clf().
Here's a brief example:
from pylab import *
figure() # Not really needed, you could have typed plot right away, but here
you can set some nice features like the size
plot([1,2,3])
plot([2,1,2]) # Will
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 to
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 that there
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 providing some
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 bad -- I
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
Christopher
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:
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 execute this
17 matches
Mail list logo