TikZ Positioning – TikZ Labels Shifted Dependent on Letter Size

nodespositioningtikz-pgf

General description of the intrinsic behavior

The labels in a tikz picture are shifted (e.g. by above) exactly to the extreme of the letters in the labels, i.e. it takes the descender (see Wikipedia's entry for descender) of the letters into account like at the letter "g" (or the "p" of Sphinx).

enter image description here

Different aspect (why that question)

But then the following examples do not look symmetric anymore.

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\coordinate (leadl) at (1,0);
\coordinate (leadr) at (2,0);
\fill (leadl)  circle[radius=2pt];
\fill (leadr)  circle[radius=2pt];
\node[above] at (leadl) {left};
\node[above] at (leadr) {right};
\end{tikzpicture}
\end{document}

Example with labels above

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\coordinate (leadl) at (1,0);
\coordinate (leadr) at (2,0);
\fill (leadl)  circle[radius=2pt];
\fill (leadr)  circle[radius=2pt];
\node[below] at (leadl) {lelele};
\node[below] at (leadr) {rerere};
\end{tikzpicture}
\end{document}

enter image description here

Issue to be solved

What is the easiest way to work around this (in some cases wished) feature? I do not want to analyze every character in all nodes' labels that I am typing.

Best Answer

TikZ understands this problem already and offers text depth length. You can either zero it out or add the fixed amount of depth to all nodes. Example (I somehow like cramped design)

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}[scale=1.5]
\coordinate (leadl) at (3,0);
\coordinate (leadr) at (5,0);
\fill (leadr)  circle[radius=2pt];
\fill (leadl)  circle[radius=2pt];
\node[above] at (leadl) {left circle};
\node[above,text depth=0pt] at (leadr) {right circle};
\end{tikzpicture}
\end{document}

enter image description here