How to rotate a group of figures (subfigure)

3 figures side by side...

I want to put them horizontally, so that you need to rotate the book by 90° to read the figures and captions.

Now, I want to rotate this:

   \begin{figure}[]
\subfigure{
\includegraphics[width=0.28\textwidth]{figures/a.png}
}
\label{sub:graph}
\subfigure{
\includegraphics[width=0.28\textwidth]{figures/b.png}
}
\label{sub:mobile}
\subfigure{
\includegraphics[width=0.28\textwidth]{figures/c.png}
}
\label{sub:dsk}

\caption{Main cap. \ref{sub:graph} sub cap1 \ref{sub:mobile} sub cap2 and \ref{sub:desktop} sub cap3.}
\label{fig:myFig}
\end{figure}

-
Do you mean "vertically"? Do you want the subfigure and figure caption to be rotated? Should the images then be stretched to 0.28\textheight? –  Werner Dec 8 '11 at 17:12

Another way is to use the sidewaysfigure environment from the rotating package.

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{rotating}
\begin{document}
\begin{sidewaysfigure}
\centering
\includegraphics[width=0.28\textheight]{figures/c.png}
\caption{Caption for the three rotated figures\label{fig:test}}
\end{sidewaysfigure}
\end{document}


This could be combined with subfig to have captions for each figure:

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{rotating}
\usepackage{subfig}
\begin{document}
\begin{sidewaysfigure}
\centering
\subfloat[Third figure]{\includegraphics[width=0.28\textheight]{figures/c.png}\label{fig:c}}
\caption{Caption for the three rotated figures\label{fig:test}}
\end{sidewaysfigure}
\end{document}


-
simplest solution I found so far. –  ExpectoPatronum Aug 12 '13 at 12:51

Here's an option using the hvfloat package:

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{hvfloat}

\begin{document}

\hvFloat[%
nonFloat=true,%
capWidth=h,%
capPos=r,%
objectAngle=90,%
capAngle=90,%
objectPos=l%
]{figure}{%
\includegraphics[width=0.28\textheight]{figures/c.png}
}%
[Rotated Caption]{%
Caption for the three rotated figures}{fig:test}

\end{document}


Another option would be to use \rotatebox from the graphicx package and some minipages; the captions can be obtained with \captionof from the caption package:

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{caption}
\usepackage{subcaption}

\captionsetup[subfigure]{labelformat=parens,subrefformat=parens,labelsep=space}

\begin{document}

\rotatebox{90}{%
\stepcounter{figure}%
\begin{minipage}{\textheight}
\begin{minipage}{.33\textheight}
\centering
\includegraphics[width=.9\linewidth]{figures/a.png}
\captionof{subfigure}[]{First subfigure}%
\label{sub:graph}
\end{minipage}%
\begin{minipage}{.33\textheight}
\centering
\includegraphics[width=.9\linewidth]{figures/b.png}
\captionof{subfigure}[]{Second subfigure}%
\label{sub:mobile}
\end{minipage}%
\begin{minipage}{.33\textheight}
\centering
\includegraphics[width=.9\linewidth]{figures/c.png}
\captionof{subfigure}[]{Third subfigure}%
\label{sub:desktop}
\end{minipage}%