\documentclass{minimal}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node[circle,draw=black] (t) at (0,0) {};
\foreach \i in {0,1,...,359}{
\node[label={\i:$\circ$}] at (t) {};
}
\end{tikzpicture}
\end{document}
This gets me:
I expected that the positions of the labels would be circular around the node. However there is a label in north, south, east, west and then on some square path around the node. Can someone explain this to me, please?
Also I would like to have the possibility to have a circular path around the node for label positioning. Is this possible with the label-option?
Here is my exact problem:
\documentclass[border=5pt,tikz]{standalone}
\begin{document}
\begin{tikzpicture}[state/.style={inner sep=0mm,circle,draw=black,minimum width=2mm}]
\node[state,label={2:Test}] (A) at (0,0) {\tiny A};
\node[state] (B) at (5,-1) {\tiny B};
\node[state] (C) at (4,4) {\tiny C};
\foreach \from/\to in {A/B,B/C,C/A}{
\path (\from) edge (\to);
}
\end{tikzpicture}
\end{document}
Using the label-angle will yield a "jump" when switching from 2 to 3 such that it does not fit in between.
Of course you can manually position such a label such that it fits in between (I am aware of this). But this is quite cumbersome if you have to do this for a bunch of labels. I assumed that this should work directly somehow in the label to have an easier placement.
I then tried adding an extra label node:
\documentclass[border=5pt,tikz]{standalone}
\begin{document}
\begin{tikzpicture}[state/.style={inner sep=0mm,circle,draw=black,minimum width=2mm}]
\node[state] (A) at (0,0) {\tiny A};
\node[state] (B) at (5,-1) {\tiny B};
\node[state] (C) at (4,4) {\tiny C};
\node[anchor=west] at ([shift=(20:3mm)]A) {Test};
\foreach \from/\to in {A/B,B/C,C/A}{
\path (\from) edge (\to);
}
\end{tikzpicture}
\end{document}
But then you have to modify the anchor of this node depending on the angle. For instance, if you stick to the anchor and use as angle 180, then you get this without changing the anchor to east:
So having a "smooth" positioning of the lables on the circle around the object would be really nice.
tikz
libraryangles
.