How to highlight particular points in a 3D surf plot?
24 次查看(过去 30 天)
显示 更早的评论
I would like to highlight only important points that I want in a 3D surf plot. Please suggest a method to do it.
Thank You in advance!
0 个评论
采纳的回答
KSSV
2017-6-7
[X,Y,Z] = peaks(25) ;
surf(X,Y,Z)
hold on
%%highlight points which are greater then 5
idx = Z>=3 ;
plot3(X(idx),Y(idx),Z(idx),'.r','markersize',10)
%%highlight points which are less then 5
idx = Z<=-3 ;
plot3(X(idx),Y(idx),Z(idx),'.b','markersize',10)
3 个评论
KSSV
2017-6-8
If you know the point's location, use plot straight away...if you know the value, use find to get the index and then plot.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Line Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!