How to determine the different colour in scatter plot?

2 次查看(过去 30 天)
Hi Everybody,
Could you please help me how I can show it with different color? refer to the below code? this code show in one color while I need to determine different satellite by different color.
  17 个评论
Walter Roberson
Walter Roberson 2012-12-19
I'm not sure how s4_0 fits into this? Your s4 here would be a single column, but your s4_0 in your previous code was multiple columns.
Presuming that lati and longi are filtered the same way as data_filter, then it looks like you would want
idx = s4 >= 0.2;
scatter(longi(idx), lati(idx), s4(idx)*2500,'r');
Ara
Ara 2012-12-19
Thank you. It works. Just please let me ask another question regarding to different color. Assume all are filtered the same way. Each PRN in the column has different value and repeated by time and s4 column relevant to those number. I mean PRN shows number of satellite and I want to determine the circle by color to show come from which number. PRN=data_cutoff15(:,3);

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2012-12-19
Are the PRN numbers simple integers such as 1, 2, 3, 4, 5, 6 ?
numsat = max(PRN);
cmap = jet(numsat); %use any handy colormap
idx = s4 >= 0.2;
scatter(longi(idx), lati(idx), s4(idx)*2500, cmap(PRN(idx),:) );

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Scatter Plots 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by