How to determine the different colour in scatter plot?
古いコメントを表示
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
2012 年 12 月 13 日
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
2012 年 12 月 13 日
編集済み: Walter Roberson
2012 年 12 月 13 日
Azzi Abdelmalek
2012 年 12 月 13 日
編集済み: Azzi Abdelmalek
2012 年 12 月 13 日
You are just erasing the previous scatter. What you can do is to scatter the biggest circle then the smallest
Walter Roberson
2012 年 12 月 13 日
You are plotting two circles of the same size at the same location. Only the second one is going to show up.
Walter Roberson
2012 年 12 月 17 日
idx = s4_0(1,:) >= 0.2;
scatter(longi(idx), lati(idx), s4_0(1,idx)*2500,'r');
Ara
2012 年 12 月 17 日
Walter Roberson
2012 年 12 月 17 日
Please show min(S4_0(1,:)) and max(S4_O(1,:))
Ara
2012 年 12 月 19 日
Walter Roberson
2012 年 12 月 19 日
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
2012 年 12 月 19 日
Walter Roberson
2012 年 12 月 19 日
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
2012 年 12 月 19 日
Walter Roberson
2012 年 12 月 19 日
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
2012 年 12 月 19 日
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
2012 年 12 月 19 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Just for fun についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!