필터 지우기
필터 지우기

Is possible to use clabel with fcontour?

조회 수: 3 (최근 30일)
Mechrod
Mechrod 2017년 3월 6일
댓글: Arun Kumar Kantheti 2022년 2월 25일
Hi. I'm trying to use clabel with the fcontour plot. I had read several examples using contour, contourf and others, but none with fcountour. Is it possible to label the contours of fcontour? Here is part of the code.
figure('Name','Solution');
subplot(2,2,[1 2]);
clabel([],8);
fc = fcontour(T,[-0.05 0.02 -0.03 0.03],'fill','off','LevelList',[100 200 400 600....
800 1000 1200 1400 1600],'MeshDensity',150); grid on;
colorbar; title('Vista Topo'); xlabel('x'); ylabel('y');
I use this, no error appears, but there is no labels on the contours. Thanks in advance.
  댓글 수: 2
Alistair Nieuwoudt
Alistair Nieuwoudt 2017년 3월 26일
I would also like to know this.
Arun Kumar Kantheti
Arun Kumar Kantheti 2022년 2월 25일
For the same function T, first use fcontour() to get the X, Y, Z values as below:
figure(1)
h = fcontour(T, range);
Then use the contour() to plot the contour values in another figure window:
figure(2)
contour(h.XData, h.YData, h.ZData, 'ShowText', 'on')

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Contour Plots에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by