I have an figure containing a number of very large surfaces (essentially a pcolor plot) overlaid with a contour plot of a different data set. Now I want to select a small area to reuse in another figure. I can copy it using copyobj(allchild(gca),newaxeshandle) and zoom using xlim([x1,x2]), ylim([y1,y2]), but that method carries along all the (many MB of) data outside the x,y limits I need. I'm not planning on zooming out again. How can I throw away the excess data?
%Draw a contour plot and check how big the data is:
%open a fresh axes as part of a new figure