I would like to build tables using pgfplotstable. Everything works fine so far -- except for one small thing: Although having read the corresponding section in the manual, I experience problems using the add-macro.

This is a MWE that works fine:



        string type,
        column type={l},
        empty cells with={--}
    every head row/.style={before row=\toprule},
    every first row/.style={before row=\midrule},
    every last row/.style={after row=\bottomrule},


    This is my table.

    \pgfplotstableread{ %some fictional data
            Martin  lemon       strawberry
            Lucy        cake        dessert     
                            columns/0/.style={naftext, column name=label column},
                            columns/1/.style={naftext, column name=column 1},
                            columns/2/.style={naftext, column name=column 2},


I now would like to add a vertical line between label column and column 1 without changing by global style definition. I tried

columns/0/.style={naftext, column name=label column, column type/.add{}{|}}

which (I thought) would add me a | after the l -- but unfortunately pgfplotstable reports an error when doing this:

Package pgfkeys Error: I do not know the key '/pfgplots/table/column type/.add{}{|}' and I am going to ingore it. Perhaps you misspelled it.

Any ideas?


It can be easily fixed with more coffee; A key needs an equal sign to assign a value




| improve this answer | |
  • Damn! I knew that I must have been overlooking something... – Sven Rüberg Jul 8 '14 at 17:28

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.