Hi list,
I guess it's not limited to the basemap toolkit, but it fits to explain my problem:
I'd like to produce time series with basemap. As drawing coastlines, countrys etc. is expensive, but stays the same for every time step, I'd like to draw the basemap "background" only once and the reuse I.
copy / deepcopy (module copy) the current axes doesn't work:
copy.Error: un(deep)copyable object of type <type 'Affine'>
Creating two identical axes with different label='XXX' doesn't work, because contourf will overwrite my background.
Same for adding a subplot to my figure.
Whats the way to "clone" an axes instance (or any other form of my background), so I can reuse it after I plotted the first time step and then called cla()?
Thanks
Simon
This can probably be solved with the copy/blit/animate stuff described
at the end of
http://www.scipy.org/Cookbook/Matplotlib/Animations
···
On 4/4/07, Simon Kammerer <simon.kammerer@...273...> wrote:
Hi list,
I guess it's not limited to the basemap toolkit, but it fits to explain
my problem:
I'd like to produce time series with basemap. As drawing coastlines,
countrys etc. is expensive, but stays the same for every time step, I'd
like to draw the basemap "background" only once and the reuse I.
John Hunter schrieb:
Hi list,
I guess it's not limited to the basemap toolkit, but it fits to explain
my problem:
I'd like to produce time series with basemap. As drawing coastlines,
countrys etc. is expensive, but stays the same for every time step, I'd
like to draw the basemap "background" only once and the reuse I.
This can probably be solved with the copy/blit/animate stuff described
at the end of
http://www.scipy.org/Cookbook/Matplotlib/Animations
Doesn't work for me, as I don't want to use a GUI but save my plots as images.
blit() raises an error:
AttributeError: 'FigureCanvasGTKAgg' object has no attribute '_pixmap'
Probably because the FigureCanvasGTK part of FigureCanvasGTKAgg is not initialized?!
I guess I need blit() implemented in FigureCanvasAgg, but to my understanding of the animation/blitting stuff, this is probably not how "lowlevel" figurecanvas like FigureCanvasAgg work, as they are vector based.
I solved my initial problem with a kind of very simple coastlines-cache in the basemap toolkit. I will discuss my changes with Jeff Whitaker, maybe they will find their way into basemap eventually...
Simon
···
On 4/4/07, Simon Kammerer <simon.kammerer@...273...> wrote: