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 Oct 21 '16 at 10:06

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

| improve this answer | |
  • ..still so much to learn after 6 years of Latex:) – recklax Oct 21 '16 at 10:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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