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 contourset.collections: > if coll in map_axes.collections: > map_axes.collections.remove(coll) > > > for label in clabels_to_remove: > if label in map_axes.artists: > map_axes.artists.remove(label) > > > for txt in texts_to_remove: > if txt in map_axes.texts: > map_axes.texts.remove(txt)
Thanks, that reduced the plotting time by an additional factor two (besides what I got from reusing the basemap instance). The remaining stuff seems hard to do anything about: - filling masked arrays in matplotlib ~15% of the CPU time - writing the png file (write_png) ~15% - drawing (non-reusable) polygon collections (draw_poly_collection) ~15% - drawing line collections (draw_line_collection) ~7% ... Cheers, Jesper ------------------------------------------------------------------------- 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