Jeff,

I've been doing some more tests today.

2009/3/3 Jeff Whitaker <jsw...@fastmail.fm>

>
>    Jose: I think the key is to only create the basemap instance only
>>    once (for the main plot and for the inset), then re-use that
>>    basemap instance each time you create an animation frame.
>>
>> That helps in memory consumption, and that's something I looked into.
>> However, my basemap instances are defined (in the case of the inset) as:
>>  m2 = Basemap(projection='ortho',lon_0=6,lat_0=-12,ax=ax2)
>> Actually, they both have references to axes. The bit I don't really
>> understand is how to define my basemap only once and then just "hang it"
>> from some axes.
>>
>
> Jose:  You can create the Basemap instance once, and then pass the axes
> with the ax keyword whenever you call a basemap method.
>

OK, I wasn't aware of this. However, memory consumption still flies. I am
aware that it could be other bits of the program that are eating up loads of
memory, but I don't know how to test where the bottleneck is. In the end, I
resorted to getting rid of basemap instances, but the problem persists.
There must be something in what I'm doing that's eating memory up, but I'm
not sure how to check what it is.

I'll try installing guppy and see whether that shines a light...
Thanks!

Jose
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to