![如何将标题放在图表旁边?](https://linux22.com/image/410005/%E5%A6%82%E4%BD%95%E5%B0%86%E6%A0%87%E9%A2%98%E6%94%BE%E5%9C%A8%E5%9B%BE%E8%A1%A8%E6%97%81%E8%BE%B9%EF%BC%9F.png)
我有一张表格,每个单元格中有 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}