Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

How can i plot coordinate point in mutiple color?

1 visualización (últimos 30 días)
Sakdinon Nopparit
Sakdinon Nopparit el 8 de Feb. de 2020
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Untitled2.png
i need to plot this coordinate in different color. i assume that column1,2,3 is x,y,z axis
If value in y is in 0.0024<x<0.0032 it will keep data in x y and z and show green.
If value in y is less than 0.0024 it will keep data in x y and z and show red.
If value in y is more than 0.0032 it will keep data in x y and z and show blue.
now i use pcshow function and i cant seperate color in different point of data.
Untitled3.png

Respuestas (1)

KSSV
KSSV el 8 de Feb. de 2020
x = rand(100,1) ;
y = rand(100,1) ;
figure
hold on
plot(x(y<=0.4),y(y<=0.4),'*r')
plot(x(y>0.4&y<0.7),y(y>0.4&y<0.7),'*b')
plot(x(y>=0.7),y(y>=0.7),'*g')
Also read about scatter, gscatter.

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by