I want a symbol written above each coordinate, which is taken from a table with a "label" column.
At first I wanted to just use \node[above] at (axis cs:\x, \y){\Label} but this causes a not obvious error, most likely related to the \Label expansion. The command \addplot+ coordinates {(\x, \y)} node[above] {Something}; with the text of the node Something works, but as soon as I put inside the node a command that is defined from a table element, I get a non-obvious error.
! Undefined control sequence. \pgfplotsretval -> node[above] {\Label } l.39
At the same time, \addplot understands the coordinates macro...
% !TeX program = pdflatex % !TeX encoding = utf8 \documentclass{standalone} \usepackage{pgfplots} \usepackage{pgfplotstable} \begin{document} \pgfplotstableread{ x y label 4 0.511 e 5 2.2 u 6 4.7 d 7 96 s 8 105.7 mu 9 1270 c 10 1777 tau 11 4180 b 12 173000 t }\loadedtable \begin{tikzpicture} \begin{semilogyaxis} \foreach \row in {0,...,8} { \pgfplotstablegetelem{\row}{x}\of\loadedtable \let\x=\pgfplotsretval \pgfplotstablegetelem{\row}{y}\of\loadedtable \let\y=\pgfplotsretval \pgfplotstablegetelem{\row}{label}\of\loadedtable \let\Label=\pgfplotsretval \addplot+ coordinates {(\x, \y)} node[above] {\Label}; } \end{semilogyaxis} \end{tikzpicture} \end{document} 