如何将标题放在图表旁边?

如何将标题放在图表旁边?

我有一张表格,每个单元格中有 2 个数字。

\begin{figure}
\begin{center}
\begin{tabular}{cc}
\includegraphics[width=0.45\textwidth]{mnist/1.png}& \includegraphics[width=0.45\textwidth]{mnist/2.png}\\
\end{tabular}
\caption{Results on the moving mnist dataset}
\label{fig:qualitativemnist}
\end{center}
\end{figure}

在此处输入图片描述

但我希望有以下附加标题

在此处输入图片描述

最简单的方法是什么?我试过这种方法,但输出不正确

\begin{figure}
\begin{center}
\begin{tabular}{ccc}
asd\\asd\\asd\\asd\\asd\\asd&
\includegraphics[width=0.45\textwidth]{mnist/1.png}& \includegraphics[width=0.45\textwidth]{mnist/2.png}\\
\end{tabular}
\caption{Prediction examples on the moving mnist dataset}
\label{fig:qualitativemnist}
\end{center}
\end{figure}

答案1

匹配图像的行间距可能会有好有坏,调整每行内的位置也可能会有好有坏。图像的基线位于最底部,因此有 [b] 表格。

\documentclass[11pt]{article}
\usepackage[draft]{graphicx}
\begin{document}

\begin{figure}[t]
\centering
\def\arraystretch{1.2}% controls row spacing
\raisebox{1ex}{\begin{tabular}[b]{@{}c@{}}% contols row centering
asd\\asd\\asd\\asd\\asd\\asd
\end{tabular}}
\includegraphics[width=0.4\textwidth]{mnist/1.png}\hfil
\raisebox{1ex}{\begin{tabular}[b]{@{}c@{}}
asd\\asd\\asd\\asd\\asd\\asd
\end{tabular}}
\includegraphics[width=0.4\textwidth]{mnist/2.png}
\caption{Prediction examples on the moving mnist dataset}% automatic \par
\label{fig:qualitativemnist}
\end{figure}

\end{document}

相关内容