Labeling only specific contour lines in a contour plot
3 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2016-12-16
回答: MathWorks Support Team
2016-12-16
I have a contour plot with many lines. However, I want to label only some of those lines. How do I do this?
采纳的回答
MathWorks Support Team
2016-12-16
For labeling only some of the lines in a contour plot, define a vector with the lines you want to label, and give that as an input argument to the "clabel" function.
As an example :
% Generate labels only for contour lines 2 and 6
[x,y,z] = peaks;
[C,h] = contour(x,y,z);
v = [2,6];
clabel(C,h,v);
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!