Basically the problem is like this. I have a relatively expensive (time wise) figure to create, specifically a map with lots of detail in it. On top of that, I'm making an inset set of axes to highlight some regions. I'm having to recreate the base of the map, which is static, every time I want to make an inset for a different region which is taking forever. What I want to do is something like this:
fig = figure() #do stuff that makes the expensive figure for region in regions: fig2 = copy.copy(fig) ax2 = fig.add_axes([0.1, 0.15, 0.25, 0.25]) ax2.fill(x1,y1) savefig(region_name) close() The problem is that the clf() clear figure function seems to clear the base of the map off, even if I try to make a copy of it inside a loop that is generating the insets. Also, close() seems to close fig and not fig2. Does this rambling make any sense, and if so, any suggestions? -- View this message in context: http://old.nabble.com/Copying-a-figure-instance--tp33544918p33544918.html Sent from the matplotlib - users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users