How to determine the different colour in scatter plot?
Mostrar comentarios más antiguos
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 comentarios
Walter Roberson
el 13 de Dic. de 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
el 13 de Dic. de 2012
Editada: Walter Roberson
el 13 de Dic. de 2012
Azzi Abdelmalek
el 13 de Dic. de 2012
Editada: Azzi Abdelmalek
el 13 de Dic. de 2012
You are just erasing the previous scatter. What you can do is to scatter the biggest circle then the smallest
Walter Roberson
el 13 de Dic. de 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
el 17 de Dic. de 2012
idx = s4_0(1,:) >= 0.2;
scatter(longi(idx), lati(idx), s4_0(1,idx)*2500,'r');
Ara
el 17 de Dic. de 2012
Walter Roberson
el 17 de Dic. de 2012
Please show min(S4_0(1,:)) and max(S4_O(1,:))
Ara
el 19 de Dic. de 2012
Walter Roberson
el 19 de Dic. de 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
el 19 de Dic. de 2012
Walter Roberson
el 19 de Dic. de 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
el 19 de Dic. de 2012
Walter Roberson
el 19 de Dic. de 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
el 19 de Dic. de 2012
Walter Roberson
el 19 de Dic. de 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
el 19 de Dic. de 2012
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Graphics Performance en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!