Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
    
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

2 Answers 2

up vote 9 down vote accepted

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/a.png}\quad
  \includegraphics[width=0.28\textheight]{figures/b.png}\quad
  \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[First figure]{\includegraphics[width=0.28\textheight]{figures/a.png}\label{fig:a}} \quad
  \subfloat[Second figure]{\includegraphics[width=0.28\textheight]{figures/b.png}\label{fig:b}}\quad
  \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}

enter image description here

share|improve this answer
    
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/a.png}\quad
\includegraphics[width=0.28\textheight]{figures/b.png}\quad
\includegraphics[width=0.28\textheight]{figures/c.png}
}%
[Rotated Caption]{%
Caption for the three rotated figures}{fig:test}

\end{document}

enter image description here

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}%
  \addtocounter{figure}{-1}%
  \captionof{figure}{Main cap. \ref{sub:graph} sub cap1 \ref{sub:mobile} sub cap2 and \ref{sub:desktop} sub cap3.}
  \end{minipage}%
}

\end{document}

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.