I would like to use pgfplotstable
to typeset some numbers stored in
a text file.
I have used \pgfplotstableread
to achieve that and it worked all
right.
Now I want to add a column to the said table that contains literal
entries, or more precisely mathematical entries.
I think I should use something like create on use
or
\pgfplotstablecreatecol
but I am a little confused about how to
actually do it.
Do you know how I could transform this
into this
The previous picture were obtained with the following code :
\documentclass{article}
\usepackage{pgfplotstable}
\usepackage{booktabs}
\usepackage{array}
\usepackage{colortbl}
\begin{document}
\begin{table}
\centering
\begin{tabular}{cccccc}\toprule
& $c_0$ & $c_1$ \\
$u \times 10^2$ & -3.8682 & 1.5055 \\
$v \times 10^6$ & 2.1272 & -8.3619 \\
$w \times 10^3$ & 1.1862 & -4.6269 \\\bottomrule
\end{tabular}
\caption{It should eventually look like this.}
\end{table}
\begin{table}
\pgfplotstableread{
-3.8682 1.5055
2.1272 -8.3619
1.1862 -4.6269
}\tabledon
\centering
\pgfplotstabletypeset[header=false,
every head row/.style={
before row={%
\toprule}},
every last row/.style={
after row=\bottomrule},
display columns/0/.style={column name={$c_0$}},
display columns/1/.style={column name={$c_1$}},
/pgf/number format/precision=4,
columns
]{\tabledon}
\caption{This is my current attempt.}
\end{table}
\end{document}
Best Answer
You can use the
create col/set list
style for supplying the list of cells: