Im experiencing problems using pgfplotstable. The following code does not produce exactly what I want:


\setmainfont[Ligatures=TeX, Numbers={OldStyle,Proportional}]{Libertinus Serif}
\setsansfont[Numbers={OldStyle,Proportional}]{Libertinus Sans}
\setmonofont[Scale=0.8]{DejaVu Sans Mono}
\setmathfont{Libertinus Math}

    output-decimal-marker = {,},
    per-mode = symbol,
    group-separator = {.},
    output-complex-root = \ensuremath{\mathrm{j}},
    retain-unity-mantissa = false,
    retain-explicit-plus = true,

 /pgf/number format/use comma,



% NOTE: The data file contains:
% 0.01 13.649 88.982 20.373 22.89564181519858
% 0.02 13.649 150.51 76.303 50.69629924921932
% 0.04 13.649 361.35 239.26 66.21281306212813
% 0.08 13.929 816.86 433.06 53.01520456381754
% 0.16 14.81 1011.7 464.49 45.9118315706237
% 0.32 16.752 955.98 459.7 48.08678005816021
% 0.64 24.119 521.1400000000001 346.69 66.52530989753232

    \caption{Resultats de les simulacions del Cas 2}\label{tbl:Cas2_resultats}
      every head row/.style={before row=\toprule,after row=\midrule},
      every even row/.style={before row={\rowcolor[gray]{0.7}}},
      every last row/.style={after row=\bottomrule},
      every column/.style={fixed zerofill={1},precision=2},
        column name={Acoblament $k_{23}$},
        column name={$f_\text{max}$ [\si{\mega\Hz}]},
        column name={$P_g$ [\si{\milli\watt}]},
        dec sep align,
        column name={$P_{_L}$ [\si{\milli\watt}]},
        dec sep align,
        column name={$\eta_t$ [\si{\percent}]},
        dec sep align,


The result is:

enter image description here

There are two problems:

  1. Although I've indicated "precision=2 and "fixed zerofill" options, some numbers are not filled with zeroes at decimal places. I would like read 76,30 and not 76,3.
  2. The fourth column (and perhaps the last too) of numbers is too displaced to the left, although the definition is the same as the previous one. I've tried the option "column type=c," to center the contents, but that completely destroys the layout.

Can anyone please help me with these two issues?

  • dec sep align separates the numbers into integer and decimal parts and puts them in separate columns to have alignment. Hence in its own point of view they are all integers. You need to preprocess them before the typesetting
    – percusse
    Dec 7, 2016 at 13:08
  • I'll investigate this "preprocess" you are suggesting. By the way: the other problem (zero-filling) seems to be related to an erroneus option I was using: I put "fixed zerofill={1}" and it should be "fixed zerofill={true}" or simply "fixed zerofill". Sorry for the noise. Dec 7, 2016 at 20:12

1 Answer 1


Partly resolved: The Zero fill problem was due to a bug in my code: I should have indicated "fixed zerofill={true}" ans NOT "fixed zerofill={1}".

The alignment problem requires further investigation, as Percusse suggested.

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.