Answering y-axis units tikz, I firstly come upon this solution:
\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usepackage{pgfplots}\pgfplotsset{compat=1.13}
\usepackage{siunitx}
\begin{document}
\begin{tikzpicture}[
]
\begin{axis}[%
xmin=1,
xmax=5,
xtick={\empty},
ymin=4,
ymax=6,
axis background/.style={fill=white},
%yticklabel={$\pgfmathprintnumber{\tick}$~V} %% this works
yticklabel={\SI{\pgfmathprintnumber{\tick}}{V}} %% this hangs
]
\addplot [color=blue, forget plot]
table[row sep=crcr]{%
1 4.1\\
2 4.9\\
3 5\\
5 5.6\\
};
\end{axis}
\end{tikzpicture}
\end{document}
That mean, I used \SI{}{}
in the yticklabel
key. Unfortunately, this seems to create an infinite loop: the compilations hangs in:
[...]
(/usr/share/texlive/texmf-dist/tex/latex/beamer/translator/dicts/translator-bas
ic-dictionary/translator-basic-dictionary-English.dict)
(/usr/share/texlive/texmf-dist/tex/latex/siunitx/siunitx-abbreviations.cfg)
...and the only way out is interrupting it.
Is it possible to fix this or it's just an operator (me) error?
\SI[round-mode = places,round-precision = 1]{\tick}{V}
– Ulrike Fischer May 15 '17 at 17:07