[Tex/LaTex] TikZ set node label position more precisely


This seems like it should be really easy but I can't seem to find it anywhere…

I'd like to be able to fine-tune the positioning of a node label.

I'm aware of the \node[label=above/below/etc:{label}] (x) {}; syntax, but that doesn't seem to give you many options on where the label goes. I'd like to be able to place the label slightly closer or farther away, or maybe in a direction other than the 8 presets available.

\tikz[label distance=x] isn't a good solution because I need it to be node-specific.

Best Answer

You can define the direction of the label by using label=<angle>:<label text>. To specify the distance on a per node distance, you have to supply it to the label options: label={[label distance=<distance>]<angle>:<label text>}


    every node/.style=draw,
    every label/.style=draw
\node [label={[label distance=1cm]30:label}] {Node};