# Aligning text vertically relative to other subfigures with subcaption

I want to add vertical (rotated) text at the beginning of a row of subfigures using the subcaption package. My solution right now is to create a separate subfigure:

\documentclass{article}

\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}

\begin{document}

\begin{figure}
\begin{subfigure}{1in}
\rotatebox{90}{\makebox[2in]{center}}
\captionsetup{skip=0pt}
\caption{}
\end{subfigure}%
\begin{subfigure}{1in}
\rule{1in}{2in}
\captionsetup{skip=0pt}
\caption{}
\end{subfigure}%
\begin{subfigure}{1in}
\rule{1in}{2in}
\captionsetup{skip=0pt}
\caption{}
\end{subfigure}
\end{figure}

\end{document}


which works fine except that I don't want any caption for the vertical text. However if I remove the "\caption{}" line then the text is no longer vertically aligned with the two subfigures. Is there a better way to do this?

• There might be a simpler alternative, but you could use the starred version for the first caption: \caption*{}. – Gonzalo Medina Nov 14 '14 at 17:56

Using the origin=c option to \rotatebox will give text that is vertically centered without the use of an extra subfigure. Alternatively you can [t] align the subfigures are rotate with origin=l:

origin=c:

origin=l and subfigures with [t]:

\documentclass{article}

\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}

\begin{document}

\begin{figure}
\rotatebox[origin=c]{90}{\makebox[2in]{center}}%
\begin{subfigure}{1in}
\rule{1in}{2in}
\caption{}
\end{subfigure}%
\begin{subfigure}{1in}
\rule{1in}{2in}
\caption{}
\end{subfigure}
\end{figure}

\begin{figure}
\rotatebox[origin=l]{90}{\makebox[2in]{center}}%