Info
此问题已关闭。 请重新打开它进行编辑或回答。
How can i plot coordinate point in mutiple color?
1 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
KSSV
2020-2-8
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.
0 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!