My data contains a column with numbers like 0.01 or 0.9412 which I want to display as 1.00% and 94.12% . I would like to declare the column by means of dec sep align. How can I do that?

[This question arose after the answer for PGFplotstable: Is it possible to set a number format for a *row* instead of a column? has been accepted. I add it as separate answer to simplify searching]

1 Answer 1


The key idea is to use

  1. a preprocessing style which multiplies the values by 100

  2. a postprocessing style which appends the percent sign

However, the postprocessing style is applied to two cells because dec sep align creates two artifical cells. The manual states that \pgfplotstablepartno can be used to identify which part is currently being postprocessed. A complete solution could be

enter image description here



        column type=r,
        dec sep align,
        postproc cell content/.append code={
                \pgfkeysalso{@cell content/.add={}{\%}}%
        fixed zerofill,

  • That is some deep magic. Thank you, it worked flawlessly!
    – Trevor
    Commented Aug 3, 2012 at 22:07
  • I posted a follow-up answer explaining how to make this work for rows instead of columns at the original question: tex.stackexchange.com/questions/65546/…
    – Trevor
    Commented Aug 3, 2012 at 22:13

You must log in to answer this question.

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