5

I have a rather large figure which I want to put in the appendix. Further, I want this figure to appear sideways (landscape mode). I have been trying with the following code which gives me exactly what I want except the image keeps showing up on the next page and not on the page which has the appendix section title and which is the page I want it to appear on. This means that now I have the appendix title on an otherwise empty page followed by the figure on the next page. If I use figure instead of sidewaysfigure it works just fine although I want the image in landscape mode and not in portrait mode.

I have tried to change \begin{sidewaysfigure}[htbp] to \begin{sidewaysfigure}[h!] and \begin{sidewaysfigure}[H] etc. without any luck. I have also tried reducing the size of the figure but even though it reduces in size it does not move up on the previous page. It seem to me the issue is with `begin{sidewaysfigure} but I might be completly wrong.

Any help is much appreciated!

\documentclass[a4paper, 12pt, hidelinks]{article}
\usepackage{fancyhdr}
\usepackage[pdftex]{graphicx} 
\usepackage{rotating}


\begin{document}
\newpage
\appendix
\section{Impulse Responses}
    \begin{sidewaysfigure}[htbp]
        \centering
        \begin{minipage}{0.92\linewidth}
            \includegraphics[width=\linewidth,keepaspectratio]{test1.pdf}
            \caption{Impulse Responses}
            \vspace{0.2cm}
            \emph{\footnotesize Note:} {\footnotesize The impulse responses.} 
        \end{minipage}
        \label{fig:xx}
    \end{sidewaysfigure}

\end{document}
6

Use a simple sideways environment and \captionof{figure}:

\documentclass[a4paper, 12pt, hidelinks]{article}
\usepackage{fancyhdr}
\usepackage[pdftex, demo]{graphicx}
\usepackage{rotating, float, caption}

\begin{document}
\newpage
\appendix

\section{Impulse Responses}
 \mbox{} \begin{center}
    \begin{sideways}%[htbp]
         \begin{minipage}{0.92\linewidth}
                    \includegraphics[width=\linewidth,keepaspectratio]{test1.pdf}
                    \captionof{figure}{Impulse Responses}
         \vspace{0.2cm}
         \emph{\footnotesize Note:} {\footnotesize The impulse responses.}
         \label{fig:xx}
         \end{minipage}
    \end{sideways}
    \end{center}

\end{document} 

enter image description here

  • It works! Thank you Bernard! Do you know why my previous attempt did not work? How come the figure would not move up on the previous page even though it would have fit size wise? – Plissken Jul 31 '16 at 17:34
  • It seems sideways floats require a page of their own, but I really don't know what in the code induces this behaviour. – Bernard Jul 31 '16 at 17:53
  • Okay. Thank you for both answers! This really helped me. – Plissken Jul 31 '16 at 18:17
  • @Bernard How would you do it with two subfigures? – Hel Dec 17 '17 at 21:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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