I need all the numbers in the first column to have the same exponent of ten, say 10^{-2}
.
It would be nice if the multiplier was placed not near the number, but in the header of the table.
\documentclass[]{article}
\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{pgfplots, pgfplotstable}
\pgfplotstableread[]{
X Y Xerror Yerror Y2
0 0 0 0 0
0.022 0.4 0.005 0.1 0.66
0.038 0.8 0.005 0.1 1.14
0.058 1.2 0.005 0.1 1.74
0.09 1.6 0.005 0.1 2.7
0.101 2 0.005 0.1 3.03
0.123 2.4 0.005 0.1 3.69
0.130 2.8 0.005 0.1 3.9
}\datatable
\begin{document}
\pgfplotstableset{
columns={X,Y,Xerror,Yerror},
columns/X/.style={
column name={$x$, \si{\meter}},
/pgf/number format/.cd, sci, sci zerofill, relative*={-3}
},
columns/Y/.style={
column name={$F_\mathbf{elast}$, \si{\newton}},
/pgf/number format/.cd, fixed, fixed zerofill,
},
columns/Xerror/.style={
column name={$\Delta x$, \si{\meter}},
/pgf/number format/.cd, relative*={-2}
},
columns/Yerror/.style={
column name={$\Delta F_\mathbf{elast}$, \si{\newton}},
},
every head row/.style={
before row={\toprule},
after row={\midrule}
},
every last row/.style={after row=\bottomrule},
}
\pgfplotstabletypeset{\datatable}
\end{document}
Desired result should looks like in picture below