# sidewaysfigure and landscape

I have some figures which I wish to display in landscape, with rotated captions.

I can achieve this fine using the sidewaysfigure environment from the rotating package.

I want to also ensure that the PDF document automatically displays in the right orientation for the reader.I can achieve this using the landscape environment from the pdflscape package.

I can't however seem to combine both of these for the effect I want. If I try encapsulating the sidewaysfigure in the landscape environment I get my graphic rotated 180 degrees (the page does display in the right orientation on screen however).

\afterpage{\begin{landscape}
\begin{sidewaysfigure}
\centering
\includegraphics{image}
\caption{caption}
\label{fig:label}
\end{sidewaysfigure}
\end{landscape}}


Doesn't work - figure displays incorrectly.

\begin{sidewaysfigure}
\centering
\includegraphics{image}
\caption{caption}
\label{fig:label}
\end{sidewaysfigure}


Figure displays correctly, but PDF document doesn't recognise that this page is landscape so displays automatically in portrait when viewed on-screen.

Don't use sidewaysfigure within landscape - it will turn your figure twice. A regular figure should suffice:

\documentclass{article}
\usepackage{rotating}
\usepackage{pdflscape}

\begin{document}

\begin{landscape}
\begin{figure}
\centering
\includegraphics{image}
\caption{caption}
\label{fig:label}
\end{figure}
\end{landscape}

\end{document}

• Okay, I feel silly now. I thought I'd tried that. I needed to add some resizing options and play around. In the end [width=0.9\linewidth,keepaspectratio] worked for me. Thanks. – Jayden Feb 12 '14 at 9:29
• This solution will not float the landscape page, see tex.stackexchange.com/q/471472/36836 for a solution. – Daniel Apr 13 '19 at 19:44

Although this question was seemingly answered (by @Bettina) over a year ago, I think that the complexity of the question and answer is misleading. There are two potential problems in the proposed solution:

1. If the landscape page is placed amongst other floats, it doesn't behave nicely
2. If the landscape page has other headers/footers, it doesn't behave nicely

I think the following example illustrates how to put everything together. It works for my purposes, and the other floats around the document seem to flow properly. Now it uses the flafter package which forces floats to appear after their declaration in the text.

\documentclass{article}

\usepackage{pdflscape}
\usepackage{afterpage}
\usepackage{flafter}
\usepackage{fancyhdr}
\fancypagestyle{lscape}{%
\fancyhf{} % clear all header and footer fields
\fancyfoot[LE]{}
\fancyfoot[LO] {}
\renewcommand{\footrulewidth}{0pt}}

\begin{document}

\afterpage{
\clearpage% To flush out all floats, might not be what you want
\begin{landscape}
\thispagestyle{lscape}
\pagestyle{lscape}
\begin{figure}
\includegraphics{myfigure.pdf}
\caption{Test}
\end{figure}
\end{landscape}
}

\end{document}