2

I would like to characterise rows of subfigure: I have 2 lines, each with 3 subfigures. Each line is characterised by a different value for the parameter R. I would like to have a caption on the left (possibly vertically written) which tells which parameter is used for that line. This is the code I used, but the caption is below the line, and moreover "Figure" is added, which I don't want.

\begin{figure}[htbp]
\centering
\subfigure[]
{\includegraphics[width=0.3\textwidth]{fig1_r1.pdf}}
\hspace{5mm}
\subfigure[]
{\includegraphics[width=0.3\textwidth]{fig2_r1.pdf}}
\subfigure[]
{\includegraphics[width=0.3\textwidth]{fig2_r1.pdf}}
\caption{R=1}
\hspace{5mm}

\subfigure[]
{\includegraphics[width=0.3\textwidth]{fig1_r2.pdf}}
\hspace{5mm}
\subfigure[]
{\includegraphics[width=0.3\textwidth]{fig2_r2.pdf}}
\subfigure[]
{\includegraphics[width=0.3\textwidth]{fig2_r2.pdf}}
\caption{R}

\caption{Each line correpospond to a different value for R}\label{fig}
\end{figure}

enter image description here

1
  • You probably don't want to use \caption at all. Vertically aligning it will be a bit of a problem. Nov 13, 2014 at 22:43

2 Answers 2

2

Make the images to be centered with respect to the baseline and rotate the labels at their center. This works under the assumption that all the images on a line have the same height.

Note that the subfigure package is obsolete. Either use subfig (as here) or subcaption.

\documentclass{article}
\usepackage[export]{adjustbox}
%\usepackage{graphicx} % adjustbox loads it
\usepackage{subfig}

\begin{document}

\begin{figure}[htbp]
\centering
\rotatebox[origin=c]{90}{$R=1$}\quad
\subfloat[]{\includegraphics[width=0.3\textwidth,valign=c]{example-image}}\hfill
\subfloat[]{\includegraphics[width=0.3\textwidth,valign=c]{example-image}}\hfill
\subfloat[]{\includegraphics[width=0.3\textwidth,valign=c]{example-image}}

\rotatebox[origin=c]{90}{$R=2$}\quad
\subfloat[]{\includegraphics[width=0.3\textwidth,valign=c]{example-image}}\hfill
\subfloat[]{\includegraphics[width=0.3\textwidth,valign=c]{example-image}}\hfill
\subfloat[]{\includegraphics[width=0.3\textwidth,valign=c]{example-image}}

\caption{Each line corresponds to a different value for $R$}\label{fig}
\end{figure}

\end{document}

enter image description here

0

If you know the height a priori, use it. Here I used \settoheight on one of the images. Alternatively, you could use \raisebox{-0.5\height}{...} on every plot to center align them.

\documentclass{article}
\usepackage{graphicx}
\usepackage{mwe}

\newlength{\tempdim}

\begin{document}
\begin{figure}[htbp]
\settoheight{\tempdim}{\includegraphics[width=0.3\textwidth]{example-image-a}}%
\rotatebox{90}{\makebox[\tempdim]{R=1}}\hfil
\includegraphics[width=0.3\textwidth]{example-image-a}\hfil
\includegraphics[width=0.3\textwidth]{example-image-b}\hfil
\includegraphics[width=0.3\textwidth]{example-image-c}

\medskip
\hspace{0.65\baselineskip}\hfil
\makebox[0.3\textwidth]{(a)}\hfil
\makebox[0.3\textwidth]{(b)}\hfil
\makebox[0.3\textwidth]{(c)}

\caption{Each line corresponds to a different value for R}\label{fig}
\end{figure}
\end{document}

text in figure

If you have trouble remembering your ABCs you can always use a counter.

0

You must log in to answer this question.

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