How to determine the different colour in scatter plot?
Ältere Kommentare anzeigen
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
am 13 Dez. 2012
Why are you bothering to compute y, as you are not using it?
You are placing the circles in the same place each time, just with different sizes.
Ara
am 13 Dez. 2012
Bearbeitet: Walter Roberson
am 13 Dez. 2012
Azzi Abdelmalek
am 13 Dez. 2012
Bearbeitet: Azzi Abdelmalek
am 13 Dez. 2012
You are just erasing the previous scatter. What you can do is to scatter the biggest circle then the smallest
Walter Roberson
am 13 Dez. 2012
You are plotting two circles of the same size at the same location. Only the second one is going to show up.
Walter Roberson
am 17 Dez. 2012
idx = s4_0(1,:) >= 0.2;
scatter(longi(idx), lati(idx), s4_0(1,idx)*2500,'r');
Ara
am 17 Dez. 2012
Walter Roberson
am 17 Dez. 2012
Please show min(S4_0(1,:)) and max(S4_O(1,:))
Ara
am 19 Dez. 2012
Walter Roberson
am 19 Dez. 2012
My previous code
idx = s4_0(1,:) >= 0.2;
scatter(longi(idx), lati(idx), s4_0(1,idx)*2500,'r');
does use different radius of the circle. The s4_0(1,idx)*2500 expression is in the point-size parameter location, and the idx is selecting only those locations with the minimum radius.
But are you sure that the min() and max() are the same value ? Please show
format long g
min(S4_0(1,:))
max(S4_0(1,:))
Ara
am 19 Dez. 2012
Walter Roberson
am 19 Dez. 2012
If all of your values are the same, then what value should be used to figure out the size of the circle? Or are the values just all the same for each column, but different between the columns? Are all the values in any one column certain to be the same?
Ara
am 19 Dez. 2012
Walter Roberson
am 19 Dez. 2012
I am confused.
Oh wait, row vs column. S4_0(1,:) is a row, not a column. Okay, so are all the values for one row the same, but the values might differ between rows??
Ara
am 19 Dez. 2012
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
am 19 Dez. 2012
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Graphics Performance finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!