On Tuesday 08 May 2007 20:55, 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).

I have an axes instance on which I have plotted my map decorations 
(coastlines, meridians and so on). I would like to reuse that axes. On the 
same axes* I would like to make filled contour plot and potentially a quiver 
plot. These should be discarded after saving the plot to a file.

I know I have to discard part of the "collection" variable in the axes 
instance. But it seems like other things are changed as well. Is it safe to 
ignore these and simply do something like this:

nsave = len(ax.collections)

...do and save plot...

ax.collections = ax.collections[0:nsave]

or would you recommend doing something else?

Regards,
Jesper

*) I have tried to make an extra axes for the contour plot itself but it seems 
like matplotlib does not create an extra axes when it is the same size as an 
existing axes.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to