Thanks! :D 

Thank you very much. The ipython -pylab is working great! 

Tomislav

P.S.
Enjoy the Hawaiian sunshine... :D I'm freezing in Munich, Germany...
----- Original Message -----
From: Eric Firing
Sent: 03/15/10 07:59 PM
To: tomislav_ma...@gmx.com
Subject: Re: [Matplotlib-users] figure: underlying C/C++ object has been deleted

tomislav_ma...@gmx.com wrote:
[...]
> 
> Here is the code with the error:
> 
> 
> http://pastebin.com/3QUws70n
> 
> 
> 
> I don't understand, why would a figure object get deleted after it's 
> shown on the screen? What am I doing wrong?

This is a common "gotcha": don't use pyplot.show() anywhere other than 
at the end of a script, and then only when you want the script to 
display a figure and block. For working interactively with ipython 
(which it appears you are doing, and which is recommended), use "ipython 
-pylab". Then, the figure will be redrawn automatically after pyplot 
functions are called. If you use a more OO approach, say using the 
Axes.plot(...) method rather than the pyplot.plot(...) function, you can 
use pyplot.draw() to force an update when you want one.

Eric


> 
> 
> Thanks in advance,
> 
> Tomislav
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to