# Trouble with tick label format in pgfplots

With pgfplots I'm experiencing some trouble with tick label format with some "higher" value of coordinates. Here a sample code which is working fine:

\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{figure}[htbp]
\begin{tikzpicture}
\begin{axis}[yticklabel style={/pgf/number format/.cd,1000 sep={\,}}]
\addplot[red] coordinates{(1, 200) (2, 1500) (3, 9000)};
\end{axis}
\end{tikzpicture}
\end{figure}
\end{document}


But changing the of (3,9000) by (3,10000) generate this error:

! Package pgfkeys Error: I do not know the key '/pgf/number format/at', to which you passed '(0,1)'


What's happening?

It happens because you change the key family to number format and the next key after evaluating this is the position of the label which is a TikZ key. But because the current key family is /pgf/number format it appends it and hence looks for /pgf/number format/at
Use /pgf/number format/1000 sep instead (you also have to turn the scaling of the axis too).
• Alternatively, you can use scaled ticks=false, yticklabel style={/pgf/number format/.cd, 1000 sep={\,}}. But I agree, for a single key it's better not to use the .cd functionality. – Jake Oct 9 '16 at 15:38
• Yeah, I agree. Understanding this behaviour requires more knowledge of the internals of PGF and PGFPlots than a "normal" user should need to have. I think it would be good if the examples in the documentation didn't use /.cd at all, but just stuck to the full keys. – Jake Oct 9 '16 at 15:48
• Thanks. Finally this : scaled ticks=false, yticklabel style={/pgf/number format/.cd,1000 sep={\,},fixed} works to obtain the good format for me : thousands separation and no scientific notation. – Pascal LAFON Oct 9 '16 at 16:08