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!