How can I change the type of the decimal/thousand separator from the american one to the european one? More precisely, I want:
- "1000" to be written as is, instead of "1,000"
- "0,1" instead of "0.1"
How can I change the type of the decimal/thousand separator from the american one to the european one? More precisely, I want:
The number formatting is changed using the /pgf/number format keys, which are described starting on page 546 of the pgfmanual. In your case, you would want to set /pgf/number format/use comma to set the comma as the decimal separator, and /pgf/number format/1000 sep={} to suppress separators for the groups of thousands.
When setting several subkeys, you can save yourself a bit of typing by first changing to the main key using /pgf/number format/.cd, and then setting the number formats.
Since I assume you want the number format to be consistent all through your plot, you should set the options for the whole axis.
Here's an example:
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
/pgf/number format/.cd,
use comma,
1000 sep={}]
\addplot +[domain=0:1] {(x+rnd)*4000};
\end{axis}
\end{tikzpicture}
\end{document}

Edit: As per Jake's comments: using set decimal separator={,} instead of use comma introduces an unwanted thin space after the comma. Interestingly, if you use set decimal separator={.}, this doesn't happen. So, better to use use comma instead as per Jake's solution.
Use set thousands separator={} and set decimal separator={,} which yields:

\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
y tick label style={/pgf/number format/.cd,%
scaled y ticks = false,
set thousands separator={},
fixed},
x tick label style={/pgf/number format/.cd,%
scaled x ticks = false,
set decimal separator={,},
fixed}%
]
\addplot coordinates {
(0.1,1000)
(0.2,1100)
(0.3,1200)
};
\end{axis}
\end{tikzpicture}
\end{document}
xticklabel=\num[round-mode=places,round-precision=1]{\tick}(or similar). – Jake Dec 11 '11 at 01:24american number formatoreuropean number formatcould be useful here (this is a comment for @ChristianFeuersänger). Otherwise, if one usessiunitx, the number format should be gathered from the options set in that package. – Luigi Dec 17 '12 at 16:55pgf/number formatkeys start page 945. – bli Jun 08 '17 at 16:06