0

I'm trying to add rows to an existing pgfplotstables.

So I'm using the method using twice pgfplotstabletranspose. But it adds a new head row. I would like to delete it in order to keep the original one when i'm transposing the table a second time.

I read the manual and didnt find anything about this.

1
  • 1
    It's probably an option for \pgfplottabletranspose, but can't tell for sure without experiments. Commented Oct 19, 2018 at 13:02

1 Answer 1

1

Of course you wind up with an extra column, but those are easy to ignore.

\documentclass{article}
\usepackage{pgfplotstable}

\begin{document}
\pgfplotstableread{%
a b c d
0 1 2 3
4 5 6 7
8 9 10 11
12 13 14 15
16 17 18 19
20 21 22 23
}\mytable
\pgfplotstabletypeset{\mytable}

\pgfplotstabletranspose{\newtable}{\mytable}
\pgfplotstabletypeset[string type]{\newtable}

\pgfplotstabletranspose[colnames from=colnames,input colnames to=index]{\retable}{\newtable}
\pgfplotstabletypeset{\retable}

\end{document}
2
  • Perfect ! Can you explain to me why this is working ? Thanks !
    – joseldsm
    Commented Oct 19, 2018 at 13:21
  • 1
    Without [colnames from=] it generate new column names colnames,0,1,2,... With [colnames from=colnames] it uses the entries from colnames for the head row and does not include the column in the transpose otherwise. Commented Oct 19, 2018 at 13:33

You must log in to answer this question.

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