子图-如何将标题垂直放在侧面?

子图-如何将标题垂直放在侧面?

我试图将标题/标题放在图的侧面并垂直放置,并且不带(a)、(b)等。这是我下面的代码和我所拥有的。

\begin{figure}
    \centering
    \subfloat[Ground Truth of sequence No. 2]{{\includegraphics[width=\textwidth]{ood-results/t.png} }}
    \\
    \subfloat[100 time steps]{{\includegraphics[width=\textwidth]{ood-results/t1.png} }}
    \\
    \subfloat[100 time steps]{{\includegraphics[width=\textwidth]{ood-results/t2.png} }}
    \\
    \subfloat[100 time steps]{{\includegraphics[width=\textwidth]{ood-results/t2.png} }}
    \caption{Reconstruction results}
    \label{fig:ood1}
\end{figure}

在此处输入图片描述

下面是我想要的。标题在旁边。我该怎么做?

在此处输入图片描述

答案1

如果没有您的图像,我无法真正测试这一点。

\documentclass{article}
\usepackage[draft]{graphicx}

\begin{document}

\begin{figure}
    \sbox0{\includegraphics[width=.8\textwidth]{ood-results/t.png}}%
    \sbox1{\includegraphics[width=.8\textwidth]{ood-results/t1.png}}%
    \sbox2{\includegraphics[width=.8\textwidth]{ood-results/t2.png}}%
    \sbox3{\includegraphics[width=.8\textwidth]{ood-results/t2.png}}%
    \centering
    \begin{tabular}{c@{}c}
    \rotatebox{90}{\parbox{\ht0}{\centering Ground Truth of sequence No. 2}}&\usebox0 \\
    \rotatebox{90}{\parbox{\ht1}{\centering 100 time steps}}&\usebox1 \\
    \rotatebox{90}{\parbox{\ht2}{\centering 100 time steps}}&\usebox2 \\
    \rotatebox{90}{\parbox{\ht3}{\centering 100 time steps}}&\usebox3 \\
    \end{tabular}
    \caption{Reconstruction results}
    \label{fig:ood1}
\end{figure}

\end{document}

相关内容