How to highlight particular points in a 3D surf plot?

조회 수: 24 (최근 30일)
vishnu venkat
vishnu venkat 2017년 6월 6일
댓글: vishnu venkat 2017년 6월 8일
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!

채택된 답변

KSSV
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
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.
vishnu venkat
vishnu venkat 2017년 6월 8일
Thank you sir!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by