How can I insert specific number of contour values into a filled color contour plot (not for all contour lines)
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi all,
I am creating a filled color contour plot of my data. Here is the code;
x=data(:,1); y=data(:,2); z=data(:,3);
xx=linspace(-1.20,1.5,100) ;yy=linspace(-1.5,1.5,100);
[XX YY]=meshgrid(xx,yy); ZZ=griddata(x,y,z,XX,YY); fig1=figure('Color',[1 1 1]); axes1=axes('Parent',fig1,'FontSize',14); [C,h]=contourf(XX,YY,ZZ,20,'k-','linewidth',1); clabel(C,h,'LabelSpacing',250,'Color','k','Fontsize',8);hold on
When I plot this, I obtain the isolines with labels. But since too much labels on the figure, it seems too complicated. Hence, I do not want to add all the labels in the figure, but specific labels. I have tried some commands such as defining a vector than reading it with "clabel" in the form of "clabel(c,h,v)", but it does not work. Furthermore, I've used set(h,'TextList',[-0.1 -0.2 -0.3], but haven't been successful. Do you know how I can insert the labels that I want?
Also, is it possible to change contouring algorithm?
I would really appreciate if you could help me regarding my questions.
Kind regards,
Kaan
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Contour Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!