# Pgfplots "set thousands separator" introduces errors for < 0.1

I don't want the comma as the thousand separator, so in the preamble I set

\pgfplotsset{
x tick label style={/pgf/number format/.cd, set thousands separator={}}
}


This works OK, but when I try to do a plot, where the xmax is under 0.1, e.g. 0.01, that thousands separator line introduces errors.

Here's the MWE: (if you put xmax to 0.1, it works, at 0.01, it doesn't)

\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfplots}

\pgfplotsset{
compat=1.10,
width=7cm,
x tick label style={/pgf/number format/.cd, set thousands separator={}}
}

\begin{document}
\begin{tikzpicture}
\begin{axis}[
xmin = 0, xmax =0.01,
ymin =-200, ymax = -20]
\end{axis}
\end{tikzpicture}
\end{document}


So how to get both: no comma as thousand separator and working code for small x ranges?

You need to add scaled ticks=false. But then you will need to add fixed,precision=3, too to prevent xtick labels from getting cluttered.

\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfplots}

\pgfplotsset{
compat=1.10,
width=7cm,
x tick label style={/pgf/number format/.cd,fixed,precision=3, set thousands separator={}}
}

\begin{document}
\begin{tikzpicture}
\begin{axis}[scaled ticks=false,
xmin = 0, xmax =0.01,
ymin =-200, ymax = -20]

• good answer, but is there any way I could have the x labels with exponents? I.e. if you take my MWE code and comment out the line starting with x tick label... and see the result, then that's what I want. So basically I want everything as default except for the thousand separator to be nothing instead of a comma. May 9, 2015 at 15:28
• @Shepherd Then use /pgf/number format/set thousands separator={} as commented by egreg.