2

Why does this not produce y tick labels in fixed number format? (pgfplots version 1.9 produces y tick labels in scientific format)

\documentclass[12pt]{article}


\usepackage{pgfplots}

\begin{document}


\begin{tikzpicture}
 \begin{axis}[y tick label style={/pgf/number format/fixed}]
 \addplot{cos(x)/12.0};
 \end{axis}
\end{tikzpicture}
\end{document}
2

Adding a zerofill={true} will fix this:

Sample output

\documentclass[12pt]{article}


\usepackage{pgfplots}
\pgfplotsset{compat=1.11}

\begin{document}

\begin{tikzpicture}
  \begin{axis}[y tick label style={/pgf/number format/fixed,
                                   /pgf/number format/fixed zerofill={true}}]
    \addplot{cos(x)/12.0};
  \end{axis}
\end{tikzpicture}

\end{document}
| improve this answer | |
  • Thank you, but I'd like the numbers to come out as 0.0830 instead of $0.0830 \times 10^{-2}$. I didn't know how to force that. (My actual graph is obviously different from the above one.) I've since found out that scaled y ticks=false does what I want, but I'll accept your answer regardless. – JPi Sep 10 '14 at 0:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.