Filter löschen
Filter löschen

How to determine the different colour in scatter plot?

2 Ansichten (letzte 30 Tage)
Ara
Ara am 13 Dez. 2012
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 Kommentare
Walter Roberson
Walter Roberson am 19 Dez. 2012
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 am 19 Dez. 2012
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);

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 19 Dez. 2012
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),:) );

Weitere Antworten (0)

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by