3
$\begingroup$
Table[
    With[{n = t, k = 2}, 
        With[{a = Exp[-2 Pi*I*Range[1., n]/n]}, 
        Graphics@ GraphicsComplex[
                ReIm[I*Join[a, a^k]], 
                {
                    Circle[], 
                    {Red, PointSize -> Medium, Point@Range@n}, 
                    MapThread[Text[#, #, {0, -1.5}, -#2] &, {RotateRight[Range@n, 0], ReIm[-1.5 I*a]}]
                }]
    ]], {t, 7, 30}
]

Adapting from a previous post (for which I can't find any more), I'd like to draw some blank circles with equal spaced labeled points like so. As you can see, the postions of numbers are not really ideal.

Is there a way to improve this code, so the numbers around the circle looks nicer? I don't want to change the RotateRight[Range@n, 0] for each of them seperately if possible.

Thanks.

$\endgroup$
  • $\begingroup$ Where labels supposed to be placed? Near red points, or between? If they should be near, try changing you {0, -1.5} in Text to smth like {-2, 0}. For me it is nice eniugh. $\endgroup$ – Alx Jul 29 at 14:04
  • $\begingroup$ @Alx Thanks. It does look nicer. I just want the number to be above (outside) the circle and looks vertically aligned to the centre of the circle. Any "normal" looking way is fine. The thing is at the moment, when there are not many points, the numbers are rotated to much, I feel. $\endgroup$ – CasperYC Jul 29 at 14:33
5
$\begingroup$
Table[Graphics[{Circle[], 
    MapIndexed[{Red, PointSize -> Medium, Point @ #,  
       Black, Text[Style[#2[[1]], 14],  1.1 #, {Center, Center}]}&,
      Reverse @ CirclePoints[{0, 0}, {1, Pi/2}, n]]}, ImagePadding -> Scaled[.02]], 
   {n, 7, 10}] 

Row[%, Spacer[5]] 

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.