I want to plot first 100 Prime numbers in circular format (on circular orbit) in Mathematica.
How can i do this?
I want to plot first 100 Prime numbers in circular format (on circular orbit) in Mathematica.
How can i do this?
It took a bit of work to get the plot going in the clockwise direction, and to get the origin of the polar plot on the top rather than on the right, but this should do the trick,
With[{nprimes = 50},
ListPolarPlot[
Table[{Mod[π/2 - n 4 π/nprimes, 2 π], Prime[n]}, {n,
nprimes}], PolarAxes -> True,
PolarTicks -> {Table[{n π/180, Mod[90 - n, 360]}, {n, 0, 360,
45}], Automatic},
PolarGridLines -> Automatic,
Joined -> True,
Mesh -> Full,
MeshStyle -> Directive[PointSize[Large], Red],
PlotStyle -> Black, PlotRange -> 1.2 Prime[nprimes]]
]
ListPolarPlot. – Kuba Mar 15 '16 at 10:46