How can I circle plot X (a column data in excel format) as a function of Y and Z?

I want to plot a trajectory of each satellite as a function of longitude and latitude. To plot this would be to use a circle for each point. I mean circle plot as a function of y and z. Each point corresponds to the location where the x (a matrix 1x170) value was determined, and the radius of the circle represent the value of x. Could be 0.1, 0.2, 0.3, 0.4, 0.5 and 0.6. Could you please help me?

4 Comments

I do not understand the question. Please post some Matlab code, which creates the inputs and explain the wanted outputs.
I have the figure of it and asked me to write the code. Can I attach the figure here?? please just imagine I have three column data and I want to plot first column as a function of column two and three (as a coordinate of x and y)but when I use the command simple plot (x,y), dosen't work.
Thank you very much, I upload here http://www.sendspace.com/file/ewdml6 Could you please look at the plot?

Sign in to comment.

 Accepted Answer

scatter(y, z, x*50)
50 here is an arbitrary scaling factor. x here is being put in the location of the circle-size argument, but that argument expects a size in points (1/72 of an inch) and as your natural x values are 0.1 or so, you will want to enlarge the circles by some magnification; I arbitrarily used 50 here.

16 Comments

You can also add a 4th argument which is the RGB color matrix, one row per entry in y.
The labels would have to be put on afterwards using text()
Thank you for your time and helpful command. Just the problem is the radius of the circle are the same while the value I am using are different according to my data and I want to show it and determine those place that x data value are maximum by larger radius of the circle. Should I write a loop or what?
The size matrix is x*50 and you said the x are the values that should determine the size. So since x is in there for the third argument (which determines marker sizes), the sizes will depend on x and NOT be the same for every scatter point circle. 50 is just a scaling factor since we don't know what the size of your x is. Whatever your x is you need to find a "factor" such that factor*x will be in the range of 6 - 20 or so, otherwise the markers will be too small or too large. For example, if a typical x was 0.5 and you wanted a typical marker size of 10, then you'd need factor to be 20.
Ok, I am just play around and make the circle bigger and now want to determine the point of each circle that each point would be a location of x.
You originally said the location was determined by y and z and the marker (circle) size was specified by x. Now you seem to be saying that x is somehow related to the location rather than the size. Which is it?
Actually, each point corresponds to the location where the x value was determine, and the radius of the circle represent the value of x. And yes, y is longitude and z is latitude. Since I have alot of data so the overlap happen among the circle and then need to determine the centre of each circle to clearly show the location of it.
OK, let's clarify. We think Walter's code should work for you, assuming that you adjust the 50 to something that works for you. Is this or is this not the case? If so, mark this question as Answered. If not, state clearly why it doesn't meet your needs.
Yes, thanks the code worked and the size of the circle are in a true way just need to point the centre of each circle. Could you please look at the plot I used by your command http://www.sendspace.com/file/1dc46o In this figure just the point of each circle are need.
What does that mean? Do you mean you want a single pixel "dot" at the center of each circular marker? If so, just use plot(y, z, '.');
No, this one didn't work out. Walter's code work for me to plot the circle, but now I am trying to ask how could I have to show the centre of each circle. Please just imagine have many circle which overlap together just the way can separate them in a plot by showing their centre or point.
You are the best guys, especially you walter. Thank you.
What value did you end up using instead of 50 ?
I end up with using 2500, cause the circle are more clear.
Hi Walter, I am sorry as you guided me yesterday, but still can not plot it in different color. Could you please look at the below code? Thank you. You said 4th argument like this, but I can't match with my program?
scatter(PaskapooFm4(:,3), PaskapooFm4(:,12), [], PaskapooFm4(:,14));
PRN=data_cutoff15(:,3);
[q,u]=size(data_cutoff15);
y=zeros(31,q);
for j=1:q
for z=1:36
if z==PRN(j)
y(z,j)=s4_0(j);
end
end
end
scatter (longi, lati, s4_0(1,:)*2500,'r')
scatter (longi, lati, s4_0(2,:)*2500,'g')
scatter (longi, lati, s4_0(3,:)*2500,'b')
scatter (longi, lati, s4_0(4,:)*2500,'m')
scatter (longi, lati, s4_0(5,:)*2500,'c')

Sign in to comment.

More Answers (1)

Your question is unclear. Do you have a plot/graph/image/axes on your GUI and you want a circle drawn around the whole thing? Perhaps the FAQ will help: http://matlab.wikia.com/wiki/FAQ#How_do_I_create_a_circle.3F Do you just want a "marker" of a circle (the letter o) around each plotted data point, like you can do with plot() or scatter()??? I have no idea.

Community Treasure Hunt

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

Start Hunting!