How to reposition Labels of sfit Plot with Style Contour?
1 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
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
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!