Jose Gomez-Dans wrote:
> Hi!
>
> [I think the message didn't get through the first time I sent it. 
> Resending, and apologies if you get it twice]
>
> I have a rather complex basemap-derived plot that I want to save as 
> animation.
> In essence, it uses the blumarble() to add a nice background, plots some
> stuff on top of that, and also has an inset with a map of the world that
> shows the area of the main map.
>
> The problem is that memory usage as I iterate through the frames that will
> eventually make up my animation, rises very fast. I read a post some 
> time ago
> on how to store the background, so it didn't have to be recreated 
> everytime
> here:
> <http://www.nabble.com/Save-a-plot-background-to20519596.html#a20519596>
>
> There's an example on how to actually do this for basemaps from J 
> Whitaker,
> but I can't get this to work on my example. Ideally, I would like to store
> the inset in a function, and my main background in another function, and
> restore each axis directly. My attempt follows (which produces a blank 
> image)
> is at <http://pastebin.com/f4636fd7f>
>
> Many thanks!
> Jose

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. 

-Jeff

-- 
Jeffrey S. Whitaker         Phone  : (303)497-6313
Meteorologist               FAX    : (303)497-6449
NOAA/OAR/PSD  R/PSD1        Email  : jeffrey.s.whita...@noaa.gov
325 Broadway                Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web    : http://tinyurl.com/5telg


------------------------------------------------------------------------------
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