How can I delete surface and contour data outside of the zoomed axes?
2 ビュー (過去 30 日間)
古いコメントを表示
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?
Example:
%Draw a contour plot and check how big the data is:
contour(peaks),
ax1=gca;
ch=get(ax1,'children');
get(ch)
size(get(ch,'Contourmatrix')) %specifically
xlim([15,35]),ylim([35,45]);
%open a fresh axes as part of a new figure
figure
ax2=subplot(2,1,1);
copyobj(allchild(ax1),ax2);
ch=get(ax2,'children');
size(get(ch,'Contourmatrix'))
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Exploration についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!