I'm having a hard time trying to add trailing zeros to the scientific notation in pgfplots! Has anyone ever done this?!

Combinations of /pgf/number format/precision=2, /pgf/number format/sci and /pgf/number format/fixed zerofill doesn't work:(

My Code is:

    xmin=-20, xmax=20, ymin=-800000, ymax=-600000,
    y tick label style={/pgf/number format/sci},
    enlarge x limits=0.08,
    enlarge y limits={value=0.12,upper},
\addplot[only marks,yerr] table[x=Angle_Value, y=A_Value, y error=A_Error] {csv/w1_angle_test.txt};

And the image looks like this:

enter image description here

  • 1
    Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – Dai Bowen
    Commented Oct 21, 2016 at 10:06

1 Answer 1


The option you are looking for is the sci zerofill option; this is shown in the pgf manual under "number printing". You can change the number of trailing zeros with the precision=1 option.


yticklabel style={/pgf/number format/.cd,precision=1,sci,sci zerofill}]

 \addplot [black] coordinates  {


enter image description here

  • ..still so much to learn after 6 years of Latex:)
    – recklax
    Commented Oct 21, 2016 at 10:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .