How can I plot circle plot with ListPlot function or how to organize data to produce circle plot from ListPlot function ?
If u do something like this
ListPlot[Tuples[{{0, 1, 2, 3, 4, 5}, {-3, 3}}]]
i get
{{0, -3}, {0, 3}, {1, -3}, {1, 3}, {2, -3}, {2, 3}, {3, -3}, {3,
3}, {4, -3}, {4, 3}, {5, -3}, {5, 3}}
function value in this example is constant, and we ll see two straight lines.
but, when i need to plot circle, i have two y points per x and they are changing,
so i want plot list plot, i must have data like this:
{{0, f1[0]}, {0, f2[0]}, {1, f1[1]}, {1, f2[1]}, {2, f1[2]}, {2, f2[2]}, {3, f1[3]}, {3,f2[3]}, {4, f1[4]}, {4, f2[4]}, {5, f1[5]}, {5, f2[5]}}
where f1 is y1 and f2 is y2 and
yn = {-Sqrt[R - x^2], Sqrt[R - x^2]}
or, i can make data like this
in = Function[x, {x, (-Sqrt[25 - #1^2]) &[x], (Sqrt[25 - #1^2]) &[x]}] /@
Range[-5, 5, 1/2]
out = {{-5, 0, 0}, {-(9/2), -(Sqrt[19]/2), Sqrt[19]/2},.....
where we have {x1,y1,y2}
, but List plot dosent work with this data
So, How can i plot this?
ListPolarPlot
? If so, why do you want to useListPlot
. Also, instead of Pythagoras, you can easily generatex
andy
from theCos
andSin
of the angle. $\endgroup$CirclePoints
. $\endgroup$ListPlot[CirclePoints[100], AspectRatio -> Automatic]
. It's a pretty compact way of doing what you ask. Notice theAspectRatio
directive in order to produce an undistorted circle. $\endgroup$