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!