[Tex/LaTex] landscape figure on different page to heading

floats

I'm trying to keep a landscape figure on the same page as the section heading — with section heading still in portrait. But figure keeps slipping onto next page.

MWE here:

\documentclass{article}

\usepackage{pdflscape}  % landscape figures tables and caption
\usepackage{graphicx}

\begin{document}

\section{Figures}

\begin{landscape}
\begin{figure}[htbp]
\centering
\includegraphics{FIGURE.png}
\caption{Figure cpation}
\label{figsitemap}
\end{figure}
\end{landscape}

\end{document}

Tried altering top/bottom margins and scale bit not joy. Rotating and sidewaysfigure aren't what I want.

Any help? cheers

Best Answer

Another possible solution is the rotation by 90 degrees. In cases that you do not want to use landscape environment. A sample of output is provided underneath.

\documentclass{article}
\usepackage{graphicx} % angle=90 option provided by graphicx package.
\usepackage{wrapfig}
\usepackage{pdflscape}  % landscape figures tables and caption
\usepackage{lipsum}% dummy text
\usepackage{rotating} %sideways table
\usepackage{float} % \begin{figure}[H] same as \begin{figure}[h!]

\begin{document}
\section{Figures}
%\lipsum % Text before (remove the % to view the picture with text)

\begin{figure}[ht]
\centering
  \includegraphics[angle=0]{test.png}
  \caption{This is a caption 0 degrees.}
  \label{fig:test:1}
\end{figure}

%\lipsum % Text between (remove the % to view the picture with text)

\begin{figure}[ht]
\centering
  \includegraphics[angle=90]{test.png} % angle here 45/90/180 what ever
  \caption{This is a caption 90 degrees.}
  \label{fig:test:2}
\end{figure}

%\lipsum % Text after

\end{document}

I found the example Landscape figure in LaTeX and converted to the output: Sample

Another possible solution would be the minipage. Sample of the output is provided below:

\documentclass[a4paper,12pt]{article}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{rotating}
\usepackage{lipsum}

\begin{document}

\section{My sideways figure}

\lipsum[2]
\begin{figure}[h!]
  \centering
  \begin{minipage}[b][5cm][c]{0.5\textwidth}

  \begin{turn}{90}
    \centering
    \includegraphics{test.png}
  \end{turn}

  \end{minipage}

\hspace{-3cm}

\begin{turn}{90}
  \begin{minipage}[b][5cm][c]{0.35\textwidth}
    \caption{This is a caption.}
    \label{fig:image}
  \end{minipage}
\end{turn}

\end{figure}
\lipsum[1]

\end{document}

I found some information from Rotating: Sideways figure with Section title. You can always modify the code based on your needs. The output of the code is: Sample:2.

Personally I prefer the first sample, but depends your code and the expected output. Just try both and observe which one fits your needs.

Update:

I was sure that if I look my old files I could find a working example. Approximately a year ago that I started working with LaTeX I had the same idea with you to create a landscape picture (due to size) but I also wanted to have the section and text inside. Well I had found a solution but for different ways did not work for me but maybe it works for you. Although I do not recommend this solution to be used with text due to the difference text width (because of landscape). You can somehow suppress the document to fit the appropriate length but the result based on my criteria was not satisfying. A working example is provided underneath with the code:

\documentclass[a4paper,11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{wrapfig}
%\usepackage{chngpage}
%\usepackage{geometry} %\Change page size for floats
\usepackage{pdflscape} %\landscape latex
\usepackage{lipsum}% dummy text

\begin{document}

%\lipsum % Text before (remove the % to view the picture with text)

%\newgeometry{margin=1cm}
\begin{landscape}

\section{Land Scape Figure}
\lipsum[2]

  \begin{figure}[hb]
  %\begin{adjustwidth}{-0.1cm}{-0.1cm}
   % {
    \centering
    \includegraphics{test.png} % angle here 45/90/180 what ever
    \caption{This is a caption of a landscape figure}
    \label{fig:test}
    % }
  % \end{adjustwidth}
  \end{figure}
\lipsum[2]
\thispagestyle{empty}
\end{landscape}
%\restoregeometry

%\lipsum % Text after (remove the % to view the picture with text)

\end{document}

I have added several other "code tricks" that I managed to combine while I was implementing my solution based on my needs. I mean geometry package (very useful for really big figures, ganttcharts etc. The adjustwidth command to center a really big figure, ganttchart etc. Just play with the code and you will find many interesting things. This is a sample of the output:Sample

So in conclusion to your question. Yes it is possible to add a section in landscape with a figure and text in the same page.