How to change labels of contourf when I have no handles?
이전 댓글 표시
Hello Everybody,
I have a figure with contourf but lost the data of the figure. I would like to change the labels manually with
clabel(C,h, 'manual','Rotation',0);
but I have no handles C and h. Is it possible to get it somehow with gco or gca? Or can I extract the data and make a new plot? I would prefer option 1 though...
Thanks in advance and best regards
Jan
답변 (1개)
Chad Greene
2015년 1월 27일
If the contourf plot is the most recently-plotted object, using get(gca,...) should work. Try this:
contourf(peaks(20),10);
h = get(gca,'children');
C = get(h,'contourmatrix');
clabel(C,h,'rotation',0)
카테고리
도움말 센터 및 File Exchange에서 Contour Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!