Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How can i plot coordinate point in mutiple color?

조회 수: 1 (최근 30일)
Sakdinon Nopparit
Sakdinon Nopparit 2020년 2월 8일
마감: MATLAB Answer Bot 2021년 8월 20일
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

답변 (1개)

KSSV
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.

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by