Re: [Matplotlib-users] Strange problem with savefig?

2009-01-20 Thread Michael Droettboom
Can you provide any more information, such as your f2py module?  How are 
you passing the array to/from Python?  Perhaps it is getting destroyed 
(dereferenced to the point of it being deleted by the Python 
interpreter) and you're re-using a dangling pointer?

Mike

George Nurser wrote:
 I am finding a very strange error.

 I have a program that integrates a partial differential equation using
 fortran code in an f2py module. Data in arrays held in the f2py module
 is updated in the fortran code. The module arrays are exposed to
 python (but not changed by python code). After each increment of
 timestep the array is plotted using matplotlib, and a figure saved
 with savefig, so as to create an animation.

 What I am finding is that the fortran module array is becoming
 corrupted with NaNs.

 If, however, I simply comment out the call to savefig in my python
 code, there is no corruption of the module arrays.

 WxAgg backend, Intel Mac OS 10.5.6, python 2.5.2, matplotlib svn
 revision 6739, numpy 1.3.0.dev6297

 I have the same problem with GtkAgg python 2.5.1 + matplotlib svn
 6757.+ numpy 1.3.0.dev6297 on suse linux 10.1, amd_64.

 George Nurser.



 .

 --
 This SF.net email is sponsored by:
 SourcForge Community
 SourceForge wants to tell your story.
 http://p.sf.net/sfu/sf-spreadtheword
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
   

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Strange problem with savefig?

2009-01-19 Thread George Nurser
I am finding a very strange error.

I have a program that integrates a partial differential equation using
fortran code in an f2py module. Data in arrays held in the f2py module
is updated in the fortran code. The module arrays are exposed to
python (but not changed by python code). After each increment of
timestep the array is plotted using matplotlib, and a figure saved
with savefig, so as to create an animation.

What I am finding is that the fortran module array is becoming
corrupted with NaNs.

If, however, I simply comment out the call to savefig in my python
code, there is no corruption of the module arrays.

WxAgg backend, Intel Mac OS 10.5.6, python 2.5.2, matplotlib svn
revision 6739, numpy 1.3.0.dev6297

I have the same problem with GtkAgg python 2.5.1 + matplotlib svn
6757.+ numpy 1.3.0.dev6297 on suse linux 10.1, amd_64.

George Nurser.



.

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users