# Place node in the middle on an arc during a foreach statement

This question is akin to this one, The difference being that I want to place my nodes during a foreach loop.

MWE:

\documentclass[border=5pt,tikz]{standalone}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\def\thet{20};
\foreach \ii in {1,2,...,18}
\draw ({(\ii-1)*\thet}:\radius) arc [start angle = {(\ii-1)*\thet}, end angle ={(\ii)*\thet}, radius = \radius] node[midway] {$\theta_{\ii}$};
\end{tikzpicture}
\end{document}


Results in this:

I would like the thetas to always be placed outside the circle (next to the apex of the arc from which they came), but if i use a positioning keyword such as right or above it will switch all thetas in the same directions, which is not what I want.

How about setting the node anchor to angle in the middle + 180?

\documentclass[border=5pt,tikz]{standalone}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\def\thet{20};
node[midway,anchor={(\ii-1/2)*\thet+180}] {$\theta_{\ii}$};

• @ThorbjørnE.K.Christensen Some basics of anchors are explained on p. 233 of the pgfmanual, i.e. one can replace anchor=south by anchor=-90 and so on, and then other numbers are just a generalization thereof. – marmot May 2 at 11:43