How to reposition Labels of sfit Plot with Style Contour?

조회 수: 1 (최근 30일)
HerrVader
HerrVader 2018년 1월 25일
답변: Vishwanath Bailore Acharya 2018년 2월 12일
Hi,
I am plotting a sfit-object like this:
p2 = plot(M_fit, 'Style', 'Contour');
set(p2, 'Fill', 'off', 'LineColor', 'auto','LineStyle','-','ShowText','on','LabelSpacing',700,'LineWidth',2);
I want to manuale reposition the labels of the contour lines. I don't get the desired results by changing 'LabelSpacing' has someone an idea on how to further influence the positions of the labels?
Thank you and have a nice day

답변 (1개)

Vishwanath Bailore Acharya
Vishwanath Bailore Acharya 2018년 2월 12일
Hello Stefan,
I understand that you want to manually reposition the labels of the contour lines.
This can be done by using “clabel”. To label the contour plot manually following command allows you to click in the plot and MATLAB creates labels at the selected position for the contour line under the mouse:
>> clabel(C,h,'manual')
where 'C' is Contour matrix returned by the "contour" function and 'h' is Contour object returned by the "contour" function.
For more information regarding “clabel” you can refer to the link below,
https://www.mathworks.com/help/releases/R2017b/matlab/ref/clabel.html
I hope this helps with your query.
Thanks
Vishwanath Acharya

카테고리

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