[Tex/LaTex] How to make the title ‘Figure’ appear on the same page as the first figure

floatspage-breakingsectioning

This is my code:

    \documentclass[twoside, a4paper, 11pt]{article}
    \title{}
    \author{}
    \usepackage{amsfonts}
    \usepackage{amsthm}
    \usepackage{mathtools}
    \usepackage{verbatim}
    \usepackage{amsmath, amssymb}
    \usepackage{natbib}
    %\def\pgfsysdriver{pgfsys-dvipdfm.def}
    \usepackage{tikz}
    \usepackage{enumerate}
    \usetikzlibrary{matrix, arrows}
    \usepackage{graphicx}
    \usepackage{listings}
    \usepackage{color}
    \usepackage{listings}
    %\usepackage{hyperref}
    \usepackage{float}
    \usepackage{multicol}
    \usepackage{booktabs}
    \usepackage{lscape}
    \usepackage{cases}
    \usepackage{multirow}
    \usepackage{rotating}
    \usepackage{setspace}
    \usepackage{lscape}
    \usepackage{caption}
    \usepackage[update,prepend]{epstopdf}
    %\usepackage{mathpazo}
    %\usepackage{eulervm}
    %\usepackage{iwona}
    \usepackage[pdftex,colorlinks,linkcolor=blue,citecolor=blue]{hyperref}

    \setlength{\textwidth}{6.5in}
    \setlength{\oddsidemargin}{0in}
    \setlength{\evensidemargin}{0in}
    \setlength{\parindent}{0pt}
    \setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}

    \linespread{1.5}

    \usepackage[top=2.5cm, bottom=2.5cm, left=2cm, right=2cm]{geometry}

    \raggedbottom

    \everymath{\displaystyle} 

    \newcommand{\pder}[2][]{\frac{\partial#1}{\partial#2}}

    \begin{document}


    \newpage
\section{Figures}
\begin{landscape}
\begin{figure}
  \centering
  \caption{\textbf{Bootstrapped Probability of Default for Sovereigns} \\ This graph plots the bootstrapped probabilities of default ($PoD$) of 10 Euro Area (EA) sovereigns. The country abbreviations are shown in Table~\ref{tab:sovereignabbreviation}. All reported $PoD$s are annualized 5-year cumulative CDS-derived $PoD$s. All CDS contracts, except for Spain (SPA), are dollar (USD) denominated. We use euro denominated CDS contracts for Spain. Period: 01/01/2008 to 28/02/2013.}
  \label{bootstrapsovereign}

\includegraphics[scale=0.70]{podsovereign.png}

\end{figure}
\end{landscape}

\bibliographystyle{apa-good}
\bibliography{bibliography}
\end{document}

However, the result is that I do not have the title `Figures' on the same starting page as my first figure:

Blank title page

blank

First figure

first figure

How can I make the section title `Figure' appear above my first figure?

Best Answer

Here is my attempt.

enter image description here

What I did:

  • Passed the demo option to the article class, which shows a big black box instead of your png image (which I don't have access to).

  • Used the [h] option for the figure, so that the figure wouldn't be moved to its own page.

  • Adjusted \textfraction to 0.1, to stop large figures hijacking the entire page. This way, it is allowable for text to take up only 10% of a page.

  • Rotated the caption (using \rotcaption from the rotating package).

  • Rotated the image (using \rotatebox from the rotating package).

  • Used two minipages, one for the caption and one for the image, so they can be placed side-by-side.

Here is my code.

\documentclass[twoside, a4paper, 11pt,demo]{article}
\title{}
\author{}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{mathtools}
\usepackage{verbatim}
\usepackage{amsmath, amssymb}
\usepackage{natbib}
\def\pgfsysdriver{pgfsys-dvipdfm.def}
\usepackage{tikz}
\usepackage{enumerate}
\usetikzlibrary{matrix, arrows}
\usepackage{graphicx}
\usepackage{listings}
\usepackage{color}
\usepackage{listings}
%\usepackage{hyperref}
\usepackage{float}
\usepackage{multicol}
\usepackage{booktabs}
\usepackage{lscape}
\usepackage{cases}
\usepackage{multirow}
\usepackage{rotating}
\usepackage{setspace}
\usepackage{lscape}
\usepackage{caption}
\usepackage[update,prepend]{epstopdf}
%\usepackage{mathpazo}
%\usepackage{eulervm}
%\usepackage{iwona}
\usepackage[pdftex,colorlinks,linkcolor=blue,citecolor=blue]{hyperref}

\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}

\linespread{1.5}

\usepackage[top=2.5cm, bottom=2.5cm, left=2cm, right=2cm]{geometry}

\raggedbottom

\everymath{\displaystyle} 

\newcommand{\pder}[2][]{\frac{\partial#1}{\partial#2}}


% don't let large figures hijack entire pages
\renewcommand\textfraction{.1}

\begin{document}


\newpage
\section{Figures}


\begin{figure}[h]
\captionsetup{width=200mm}
\begin{minipage}[c]{27mm}
\rotcaption{\textbf{Bootstrapped Probability of Default for Sovereigns} \\ This graph plots the bootstrapped probabilities of default ($PoD$) of 10 Euro Area (EA) sovereigns. The country abbreviations are shown in Table~\ref{tab:sovereignabbreviation}. All reported $PoD$s are annualized 5-year cumulative CDS-derived $PoD$s. All CDS contracts, except for Spain (SPA), are dollar (USD) denominated. We use euro denominated CDS contracts for Spain. Period: 01/01/2008 to 28/02/2013.}
\label{bootstrapsovereign}
\end{minipage}
\begin{minipage}[c]{125mm}
\rotatebox{270}{\includegraphics[scale=0.70,width=210mm,height=125mm]{podsovereign.png}}
\end{minipage}
\end{figure}

\bibliographystyle{apa-good}
\bibliography{bibliography}
\end{document}