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!