how to change the color of each point in the surface?

Hi everyone. I want to change the color of each point in a surface. For example, point [3, 4, 5] in blue and , point [5,4,3] in red and so on. Please help me.

Respuestas (1)

Thorsten
Thorsten el 30 de Jun. de 2015
Editada: Thorsten el 30 de Jun. de 2015
plot3(3,4,5,'b', 5,4,3,'r')
If you have dozens of points use
scatter3(x(:),y(:),z(:), [], col)
where col is a Nx3 colormap of the colors for the 1, 2, Nth value in (x,y,z).

3 comentarios

I want to change the color of every points and this way is not good. Thanks for your answer Thorsten.
Thorsten
Thorsten el 30 de Jun. de 2015
So how are your points stored in Matlab, and what colors do you want for these points?
I apologize for the delay. points stored in cdata in the surf.In fact i want to create contour in the surf. each point related to the distance from the specific coordinate takes a certain color.

Iniciar sesión para comentar.

Etiquetas

Preguntada:

el 30 de Jun. de 2015

Comentada:

el 30 de Jun. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by