2

Actually, I write some notes about programming with Tikz and reading Jake's answer to this question, I asked myself how tikz places the "node label".

I would like to reproduce:

\begin{tikzpicture}[baseline]
\node [circle,draw] (c){Circle};
\node[red,anchor=base,text=red,fill=white] at (c.60)  {$C_1$};
\end{tikzpicture}

with a "node label"

enter image description here

\documentclass{scrartcl}
\usepackage{tikz}
\begin{document}

What I want:
\begin{tikzpicture}[baseline]
\node [circle,draw] (c){Circle};
\node[red,anchor=base,text=red,fill=white] at (c.60)  {$C_1$};
\end{tikzpicture}

What I tried:
\begin{tikzpicture}[baseline]
\node [circle,draw,label={[text=red,fill=white,anchor=base]60:$C_1$}] (c){Circle};
\end{tikzpicture}
\end{document}

anchor=base does not give the desired result. Do you know a trick or a workaround to move the "node label"? I can use shift={(-2ex,-2ex) but it's not very funny.

I read the manual 16.10.2 The Label Option cvs version and I found only this (the sentence is strange: "an anchor point for the label node is determined" seems better)

Then, an anchor point for the label node. It is determined in such a way that the label node will “face away” from the border of the main node. The anchor that is chosen depends on the position of the border point that is chosen and its position relative to the center of the main node and on whether the transform shape option is set. In general, the choice should be what you would expect, but you may have to set the anchor yourself in difficult situations.

But this does not give me a answer.

I never really liked this option label= ... as this is perhaps why I'm missing a simple solution.

Browse other questions tagged or ask your own question.