Re: [Matplotlib-users] Reusing basemap instance

2007-05-11 Thread Jesper Larsen
On Thursday 10 May 2007 17:12, Simon Kammerer wrote: I use a list for every category of items (contoursets, clabels, texts, ...), as the way to remove them is slightly different. Then I remove them from the map axes: for contourset in contoursets_to_remove: for coll in

Re: [Matplotlib-users] Reusing basemap instance

2007-05-10 Thread Simon Kammerer
I reuse a Basemap instance to reduce processing time. What I do is basically: 1. Remember all items I added to the map 2. Remove all items I don't want to keep I use a list for every category of items (contoursets, clabels, texts, ...), as the way to remove them is slightly different. Then I

Re: [Matplotlib-users] Reusing basemap instance

2007-05-09 Thread jl
Jeff Whitaker wrote: Jesper: You might consider just deleting the figure elements that you don't want to re-use (instead of figuring out everything you do want to re-use). Thanks, that approach sounds more sensible than mine. Very nice web site! Are the plots generated on the fly, or are

Re: [Matplotlib-users] Reusing basemap instance

2007-05-08 Thread Jesper Larsen
On Monday 07 May 2007 16:46, Jeff Whitaker wrote: Jesper: Can you be more specific about why you need a deepcopy? Those methods you mention do not modify the Basemap instance, although they do modify the axes instance they are used with. It shouldn't be a problem reusing the Basemap

Re: [Matplotlib-users] Reusing basemap instance

2007-05-08 Thread Jeff Whitaker
Jesper Larsen wrote: On Monday 07 May 2007 16:46, Jeff Whitaker wrote: Jesper: Can you be more specific about why you need a deepcopy? Those methods you mention do not modify the Basemap instance, although they do modify the axes instance they are used with. It shouldn't be a problem

[Matplotlib-users] Reusing basemap instance

2007-05-07 Thread Jesper Larsen
Hi matplotlib basemap users, I am doing a lot of plots of the same area but for different vertical levels, time steps and parameters. I am therefore trying to reuse my basemap instance (which in some cases is quite time consuming to setup). I am doing this by making a deepcopy of a basemap

Re: [Matplotlib-users] Reusing basemap instance

2007-05-07 Thread Jesper Larsen
On Monday 07 May 2007 16:02, Jesper Larsen wrote: The deepcopy operation takes almost as much time as creating a new basemap instance. If the basemap instance was unchanged by my plotting I would of course be able to avoid doing this and simply use a basemap instance without copying it. Am I