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
I had the same problem about figures that freeze using IDLE and
matplotlib but finally I manage to solve it with the help of Eric and
also a bit of luck.
Instead of using TkAgg I use WxAgg and it never hangs.
I use Idle -n and in the matplotlibrc set Interactive
I use all latest version of Numpy
I also had a problem matching matplotlib's mathfonts with my Beamer
(http://latex-beamer.sourceforge.net) presentation's Helvetica (or
sans-serif) mathfonts.
As LaTeX does not support Helvetica Math unless you buy it from
Micropress, I was curious as to how Till Tantau managed to implement
sans-se
Hi,
How can I use zoom for polar plots ?
I mean a circular cutout would be better than a rectangular cutout.
Nils
from scipy import *
from pylab import show, polar
def M(omega):
s = 1j*omega
return linalg.solve(s*identity(n)-A_0,A_1)*exp(-h_0*s)
A_0 = array(([0,1.],[-32,-2]))
A_1 = arra
I have experienced the same problem with IDLE.
It only works with -n, but then you lose the nice feature of 'starting
over'.
Does anybody know a fix so we can do both?
Thanks,
Mark
BTW, when you use pylab in interactive mode, the axis() command should scale
your figure interactively, also under I
> "belinda" == belinda thom <[EMAIL PROTECTED]> writes:
belinda> I can create plots to my hearts content in both, but when
belinda> I ask to rescale the plots, e.g. axis([-.2,2.4,-2,2.4]),
belinda> NOTHING happens to the figure drawn via IDLE, whereas the
belinda> command work
> "belinda" == belinda thom <[EMAIL PROTECTED]> writes:
belinda> Hi,
belinda> I've been playing w/both IDLE and IPython, using TkAgg in
belinda> both cases as the back end. Also, I've got the latest
belinda> matplotlib and ipython versions and am using MacPython's
belinda>
Mark,
> BTW, when you use pylab in interactive mode, the axis() command
> should scale your figure interactively, also under IDLE. Have you
> tried that?
Yes, I tried using axis in both IDLE and IPython. IPython's redrew
the axis automatically whereas IDLE's did not.
I am not sure, but I t
> "belinda" == belinda thom <[EMAIL PROTECTED]> writes:
belinda> I am not sure, but I think this difference in behavior is
belinda> b/c IPython is a bit better about calling
belinda> draw_if_interactive after "most pylab functions" (see
belinda> Eric Firing's http://www.mail-ar
I am posting this message to both numpy and matplotlib mailing lists
because the thread relates to both.
First, Robert Kern kindly provided step-by-step instructions for Macs
(PPCs and Intels) regarding how to install FROM SOURCE the packages
needed to allow Python to become a viable alterna
belinda thom wrote:
> I am posting this message to both numpy and matplotlib mailing lists
> because the thread relates to both.
Actually, it's really only relevant to matplotlib.
> However, after installing wx and matplotlib, various problems result:
>
> 1) warnings about fonts
> 2) wx fails
> "Robert" == Robert Kern <[EMAIL PROTECTED]> writes:
Robert> Personally, I think the warnings are a bit overzealous and
Robert> should be silenced. It's not as if the user is explicitly
Robert> telling the font manager to load those specific
Robert> fonts. They are automatica
Thanks.
And running w/pythonw does what it should :-).
On Jan 10, 2007, at 12:16 PM, John Hunter wrote:
>> "Robert" == Robert Kern <[EMAIL PROTECTED]> writes:
>
> Robert> Personally, I think the warnings are a bit overzealous and
> Robert> should be silenced. It's not as if the use
Robert,
> Try running with pythonw.
Do you know how to fix this in IDLE (it must be using python as
opposed to pythonw somehow).
Thanks again for all your help,
--b
-
Take Surveys. Earn Cash. Influence the Future of IT
J
John Hunter wrote:
>> "Robert" == Robert Kern <[EMAIL PROTECTED]> writes:
>
> Robert> Personally, I think the warnings are a bit overzealous and
> Robert> should be silenced. It's not as if the user is explicitly
> Robert> telling the font manager to load those specific
> Robe
belinda thom wrote:
> Robert,
>
>> Try running with pythonw.
>
> Do you know how to fix this in IDLE (it must be using python as
> opposed to pythonw somehow).
I'm afraid that I don't know enough about IDLE to help you.
--
Robert Kern
"I have come to believe that the whole world is an enigm
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
> "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
Robert Kern wrote:
> Try running with pythonw.
That's probably not it -- as of MacPython 2.4, pythonw ands python are
the same.
belinda thom wrote:
> And running w/pythonw does what it should :-).
OK, now I'm confused:
$ ls -l /Library/Frameworks/Python.framework/Versions/2.4/bin/python2.4
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
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
Hi Chris, Robert, ...?,
I'm glad you reminded me to make sure the path was right, b/c this
time, I had forgotten to run the "Update Shell" command that came w/
MacPython2.4. This gave me:
lrwxr-xr-x 1 root wheel 67 Jan 7 14:29 /usr/local/bin/pydoc@ -
> ../../../Library/Frameworks/Python.fram
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
belinda thom wrote:
> I went back and retried the plotting w/wx
> as a backend and discovered that wx FAILS with PYTHONW and PYTHON
> (appended).
Okay, what version of wxPython did you install? What version of wxPython is
actually imported (check wx.__version__)?
(And we can leave off numpy-d
Hi,
On Jan 10, 2007, at 5:56 PM, Robert Kern wrote:
> belinda thom wrote:
>> I went back and retried the plotting w/wx
>> as a backend and discovered that wx FAILS with PYTHONW and PYTHON
>> (appended).
>
> Okay, what version of wxPython did you install? What version of
> wxPython is
> actually
belinda thom wrote:
> Hi,
>
> On Jan 10, 2007, at 5:56 PM, Robert Kern wrote:
>
>> belinda thom wrote:
>>> I went back and retried the plotting w/wx
>>> as a backend and discovered that wx FAILS with PYTHONW and PYTHON
>>> (appended).
>> Okay, what version of wxPython did you install? What versio
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
>From 'python setup.py build':
src/_ns_backend_gdk.c:17:25: pygtk/pygtk.h: No such file or directory
However, ...
[EMAIL PROTECTED] ~]$ locate pygtk.h
/usr/local/pygtk-2.8.6/gtk/pygtk.h
/usr/local/include/pygtk-2.0/pygtk/pygtk.h
Do I need to add /usr/local/include/pygtk-2.0/ somewhere in
28 matches
Mail list logo