I am creating a plot showing how air pollution changes in a room over time. I have a record of activity in the room and want to colour the plot according to wether there is activity (1) or no activity (0), for which I have created a logistical variable.
I have used the below code but it is plotting no activity in yellow - which is very hard to see. How do I determine my own colours when plotting colour according to a variable?
scatter(Table.Date_Time, Table.PM_Concentration, 5, Table.Activity)

댓글 수: 1

s = scatter(Table.Date_Time, Table.PM_Concentration, 5, Table.Activity);
s.MarkerEdgeColor = 'your color choice';
s.MarkerFaceColor = 'your color choice';
and so on..

댓글을 달려면 로그인하십시오.

 채택된 답변

darova
darova 2020년 3월 16일

0 개 추천

try to change color axis
caxis([min(Table.Activity) max(Table.Activity)])
colormap jet

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Orange에 대해 자세히 알아보기

제품

질문:

2020년 3월 16일

답변:

2020년 3월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by