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 instance created by this simple function (where mapresolution is a function giving the different map resolutions for different areas):
def getbasemap(area): """Returns basemap instance for a given area.""" from matplotlib.toolkits import basemap mapres = mapresolution(area) m = basemap.Basemap(area[0], area[1], area[2], area[3], resolution=mapres) return m 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 right in asserting that this is not the case? Any suggestions on how to avoid deepcopying it? 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