并排放置 2 个 pgfplots 长表

并排放置 2 个 pgfplots 长表

如何将两张桌子并排摆放?

为了简单起见,我想将相同的两个表格并排放在同一页面上。

这是我目前为其中一个表编写的代码:

\documentclass{article}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{longtable}
\usepackage{siunitx}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\pgfplotsset{compat=newest}
\usepackage{colortbl}
\usepackage{xcolor}

\begin{document}

\pgfplotstableread{
  Test  Recog
  1   1
  2   2
  3  25
  4   4
  5   5
  6   6
  7   7
  8   8
  9   9
 10  10
 11  19
 12  12
 13  13
 14  14
 15  15
 16   1
 17   4
 18  18
 19  19
 20  20
 21  21
 22  22
 23  23
 24  15
 25  25
 26  26
 27  27
 28  28
 29  29
 30  30
 31  15
 32  32
 33  33
 34  34
 35  35
 36   7
 37  37
 38  38
 39  39
 40  40
}{\loadedtable}

\pgfplotstableset{
    begin table=\begin{longtable},
    end table=\end{longtable},
}
\sisetup{
    table-format = 3.2e+3,
    round-precision=2,
    round-mode=places,
    scientific-notation=engineering,
    group-digits=integer,
    group-separator={,},
    exponent-product = \cdot,
}

\pgfplotstabletypeset[
every odd row/.style={
before row={\rowcolor{blue!40}}},
every head row/.style={
before row=\toprule,after row=\midrule},
every last row/.style={
after row=\bottomrule},
    header=true,
    string type,
    multicolumn names,
    columns={Test, Recog},
    assign column name/.code={%
        \pgfkeyssetvalue{/pgfplots/table/column name}{\multicolumn{1}{c}{\multirow{2}{*}{#1}} }%
    },
    columns/Test/.style ={column name={\shortstack{\bfseries{Test}\\\bfseries{Image}}}},
    columns/Recog/.style ={column name={\shortstack{\bfseries{Recognized}\\\bfseries{Image}}}},
        every head row/.style={before row=\toprule, after row=\\\midrule\endhead},
    every last row/.style={after row=\bottomrule},
]{\loadedtable}

\pgfplotstableset{
    begin table=\begin{longtable},
    end table=\end{longtable},
    }

\pgfplotstabletypeset[
every odd row/.style={
before row={\rowcolor{blue!40}}},
every head row/.style={
before row=\toprule,after row=\midrule},
every last row/.style={
after row=\bottomrule},
    header=true,
    string type,
    multicolumn names,
    columns={Test, Recog},
    assign column name/.code={%
        \pgfkeyssetvalue{/pgfplots/table/column name}{\multicolumn{1}{c}{\multirow{2}{*}{#1}} }%
    },
    columns/Test/.style ={column name={\shortstack{\bfseries{Test}\\\bfseries{Image}}}},
    columns/Recog/.style ={column name={\shortstack{\bfseries{Recognized}\\\bfseries{Image}}}},
        every head row/.style={before row=\toprule, after row=\\\midrule\endhead},
    every last row/.style={after row=\bottomrule},
]{\loadedtable}

\end{document} 

相关内容