
Tengo una tabla a continuación y me gustaría insertar una figura a su derecha. Tanto la tabla como la figura utilizarán un solo título. A continuación se muestra mi código para la tabla.
\begin{table*}
\begin{center}
\begin{tabular}{|l|l|cc|cc|cc|}
\hline%\noalign{\smallskip}
\multirow{2}{*}{Type} & \multirow{2}{*}{Model} & \multicolumn{2}{c|}{$\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:30}$} & \multicolumn{2}{c|}{$\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:50}$} & \multicolumn{2}{c|}{$\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:70}$} \\
& & SSIM & PSNR & SSIM & PSNR & SSIM & PSNR \\
\hline
\multirow{3}{*}{Deterministic} \ & 2D ConvLSTM \cite{convlstm} & 0.712 & 23.58 & 0.639 & 22.85 & 0.551 & 20.13 \\
& PredRNN++ \cite{wang-predrnn} & 0.865 & 28.47 & 0.741 & 25.21 & 0.702 & 23.51 \\
& E3D-LSTM \cite{wang-e3d} & \textbf{0.879} & \textbf{29.31} & 0.810 & 27.24 & 0.798 & 26.82 \\
\hline
\multirow{2}{*}{Stochastic} & Variational 2D ConvLSTM \cite{vrnn} & 0.787 & 25.76 & 0.733 & 24.83 & 0.672 & 23.13 \\
& Variational 3D ConvLSTM (Ours) & 0.866 & 28.31 & \textbf{0.852} & \textbf{27.89} & \textbf{0.846} & \textbf{27.66} \\
\hline
\end{tabular}
\end{center}
\caption{Results on the KTH action dataset when using 10 frames to predict 20 ($\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:30}$), 40 ($\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:50}$), and 60 ($\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:70}$) timesteps into the future. The metrics are computed frame-wise. Higher SSIM and PSNR scores indicate better results.}
\label{table:quantitativekth}
\end{table*}
Intenté seguir el código aquí.Incluir tabla como subfigurapero la figura siempre aparece debajo.
\begin{table*}
\begin{center}
\subfloat[][]{\begin{tabular}{|l|l|cc|cc|cc|}
\hline%\noalign{\smallskip}
\multirow{2}{*}{Type} & \multirow{2}{*}{Model} & \multicolumn{2}{c|}{$\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:30}$} & \multicolumn{2}{c|}{$\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:50}$} & \multicolumn{2}{c|}{$\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:70}$} \\
& & SSIM & PSNR & SSIM & PSNR & SSIM & PSNR \\
\hline
\multirow{3}{*}{Deterministic} \ & 2D ConvLSTM \cite{convlstm} & 0.712 & 23.58 & 0.639 & 22.85 & 0.551 & 20.13 \\
& PredRNN++ \cite{wang-predrnn} & 0.865 & 28.47 & 0.741 & 25.21 & 0.702 & 23.51 \\
& E3D-LSTM \cite{wang-e3d} & \textbf{0.879} & \textbf{29.31} & 0.810 & 27.24 & 0.798 & 26.82 \\
\hline
\multirow{2}{*}{Stochastic} & Variational 2D ConvLSTM \cite{vrnn} & 0.787 & 25.76 & 0.733 & 24.83 & 0.672 & 23.13 \\
& Variational 3D ConvLSTM (Ours) & 0.866 & 28.31 & \textbf{0.852} & \textbf{27.89} & \textbf{0.846} & \textbf{27.66} \\
\hline
\end{tabular}
}
\quad
\subfloat[][]{\includegraphics[width=0.1\textwidth]{kth.png}}
\end{center}
\caption{Results on the KTH action dataset when using 10 frames to predict 20 ($\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:30}$), 40 ($\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:50}$), and 60 ($\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:70}$) timesteps into the future. The metrics are computed frame-wise. Higher SSIM and PSNR scores indicate better results.}
\label{table:quantitativekth}
\end{table*}
Respuesta1
- Su tabla es un poco ancha, por lo que en el siguiente MWE reduzco el tamaño de fuente utilizado en la tabla y el tamaño de
\tabcolsep
- la tabla y la imagen están encapsuladas en la tabla
- para el centrado vertical de la figura se utiliza
valign=c
la opción c definida enadjustbox
el paquete (también cargagraphicx
el paquete,
\documentclass[twocolumn]{article}
%\usepackage{geometry}
%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\usepackage[export]{adjustbox}
\usepackage{multirow}
\usepackage{siunitx}
\begin{document}
\begin{table*}
\centering
\setlength\tabcolsep{4pt}
\begin{tabular}{@{} lr @{}}
\small
\begin{tabular}{@{} |l|l|cc|cc|cc|@{}}
\hline
\multirow{2}{*}{Type} & \multirow{2}{*}{Model} & \multicolumn{2}{c|}{$\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:30}$} & \multicolumn{2}{c|}{$\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:50}$} & \multicolumn{2}{c|}{$\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:70}$} \\
& & SSIM & PSNR & SSIM & PSNR & SSIM & PSNR \\
\hline
\multirow{3}{*}{Deterministic} \ & 2D ConvLSTM \cite{convlstm} & 0.712 & 23.58 & 0.639 & 22.85 & 0.551 & 20.13 \\
& PredRNN++ \cite{wang-predrnn} & 0.865 & 28.47 & 0.741 & 25.21 & 0.702 & 23.51 \\
& E3D-LSTM \cite{wang-e3d} & \textbf{0.879} & \textbf{29.31} & 0.810 & 27.24 & 0.798 & 26.82 \\
\hline
\multirow{2}{*}{Stochastic} & Variational 2D ConvLSTM \cite{vrnn} & 0.787 & 25.76 & 0.733 & 24.83 & 0.672 & 23.13 \\
& Variational 3D ConvLSTM (Ours) & 0.866 & 28.31 & \textbf{0.852} & \textbf{27.89} & \textbf{0.846} & \textbf{27.66} \\
\hline
\end{tabular}
&
\includegraphics[width=0.1\linewidth,valign=c]{example-image-duck}
\end{tabular}
\caption{Results on the KTH action dataset when using 10 frames to predict 20 ($\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:30}$), 40 ($\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:50}$), and 60 ($\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:70}$) time steps into the future. The metrics are computed frame-wise. Higher SSIM and PSNR scores indicate better results.}
\label{table:quantitativekth}
\end{table*}
\end{document}
Apéndice:
Si desea tener la tabla y la imagen alineadas en la parte inferior, simplemente agregue la opción [b]˙to insert4d table and at image remove option
valign=c`:
\documentclass[twocolumn]{article}
\usepackage[export]{adjustbox}
\usepackage{multirow}
\usepackage{siunitx}
\begin{document}
\begin{table*}
\centering
\setlength\tabcolsep{4pt}
\begin{tabular}{@{} lr @{}}
\small
\begin{tabular}[b]{@{} |l|l|cc|cc|cc|@{}}
\hline
\multirow{2}{*}{Type} & \multirow{2}{*}{Model} & \multicolumn{2}{c|}{$\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:30}$} & \multicolumn{2}{c|}{$\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:50}$} & \multicolumn{2}{c|}{$\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:70}$} \\
& & SSIM & PSNR & SSIM & PSNR & SSIM & PSNR \\
\hline
\multirow{3}{*}{Deterministic} \ & 2D ConvLSTM \cite{convlstm} & 0.712 & 23.58 & 0.639 & 22.85 & 0.551 & 20.13 \\
& PredRNN++ \cite{wang-predrnn} & 0.865 & 28.47 & 0.741 & 25.21 & 0.702 & 23.51 \\
& E3D-LSTM \cite{wang-e3d} & \textbf{0.879} & \textbf{29.31} & 0.810 & 27.24 & 0.798 & 26.82 \\
\hline
\multirow{2}{*}{Stochastic} & Variational 2D ConvLSTM \cite{vrnn} & 0.787 & 25.76 & 0.733 & 24.83 & 0.672 & 23.13 \\
& Variational 3D ConvLSTM (Ours) & 0.866 & 28.31 & \textbf{0.852} & \textbf{27.89} & \textbf{0.846} & \textbf{27.66} \\
\hline
\end{tabular}
&
\includegraphics[width=0.1\linewidth]{example-image-duck}
\end{tabular}
\caption{Results on the KTH action dataset when using 10 frames to predict 20 ($\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:30}$), 40 ($\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:50}$), and 60 ($\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:70}$) time steps into the future. The metrics are computed frame-wise. Higher SSIM and PSNR scores indicate better results.}
\label{table:quantitativekth}
\end{table*}
\end{document}