0

I am trying to have the title/caption to be at the side of the figure and vertical and also without the (a), (b), etc. This is my code below and what I have.

\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}

enter image description here

And below is what I would like. The title at the side. How can I do this ?

enter image description here

1
  • Use a tabular. The only tricky bit is setting the width of the rotated \parbox fo match the height of the images. Dec 22, 2017 at 19:05

1 Answer 1

3

Without your images I couldn't really test this.

\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}
2
  • thank you it worked nicely. How can I reduce the gap between the subcaption and the figure for parbox ?
    – Kong
    Dec 22, 2017 at 20:29
  • A 2\tabcolsep gap is added automatically by tabular between columns, but can be replaced using the &{} protocol. Dec 23, 2017 at 5:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .