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

24 visualizaciones (últimos 30 días)
vishnu venkat
vishnu venkat el 6 de Jun. de 2017
Comentada: vishnu venkat el 8 de Jun. de 2017
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!

Respuesta aceptada

KSSV
KSSV el 7 de Jun. de 2017
[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 comentarios
KSSV
KSSV el 8 de Jun. de 2017
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 el 8 de Jun. de 2017
Thank you sir!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by