9

I'm trying to print a section that has only figures (no text aside from captions). I have a figure that clearly does not take up a whole page (it takes up half a page at most), but for some reason I get my section header "Model fitting" at the top of a page, then COMPLETE BLANK SPACE under it for the rest of the page, then on the next page the figure I want to include. This is the whole command that I am using for this section (Note I have two figures, but I don't care that the second figure also takes up an entire page):

\FloatBarrier
\subsection{Model fitting}
\begin{figure}
\includegraphics[width=0.5\textwidth]{IRrelation_fitted.pdf}
\includegraphics[width=0.5\textwidth]{IRrelation_Logfitted.pdf}
\caption{(left) plot of the IR voltage output as a function of distance with the fitted curve plotted over it.(right) plot of the log of IR voltage as a function of the log distance with the fitted curve plotted over it}
\label{fig: IR relationship}
\end{figure}

\begin{figure}
\includegraphics[width=0.5\textwidth]{IRrelation_diag01.pdf}
\includegraphics[width=0.5\textwidth]{IRrelation_diag02.pdf}
\includegraphics[width=0.5\textwidth]{IRrelation_diag03.pdf}
\includegraphics[width=0.5\textwidth]{IRrelation_diag04.pdf}
\caption{Diagnostic plots for linear regression used on IR sensor data as a function of distance. \textbf{top left:} Plot of residuals \textbf{top right:} quantile plot of residuals \textbf{bottom left:} scale-location plot, \textbf{bottom right:} Cook's distance (influence)}
\label{fig: IR diagnostics}
\end{figure}
\FloatBarrier
  • Welcome to TeX.sx! Here's a starter guide – texenthusiast May 7 '13 at 5:31
  • If the solution below answered your question, remember to upvote and accept so that people with the same problem in future will be able to make use of this post. – oLas May 8 '13 at 22:52
9

Without any text, float behaviour can seem pretty peculiar, LaTeX is just trying to make your document look nice. See great answer on How to influence the position of float environments like figure and table in LaTeX? by Frank Mittelbach.

For your specific problem, I used the placement specifier [!h] for both floats:

\FloatBarrier
\subsection{Model fitting}
\begin{figure}[!ht]
\includegraphics[width=0.5\textwidth]{IRrelation_fitted.pdf}
\includegraphics[width=0.5\textwidth]{IRrelation_Logfitted.pdf}
\caption{(left) plot of the IR voltage output as a function of distance with the fitted curve plotted over it.(right) plot of the log of IR voltage as a function of the log distance with the fitted curve plotted over it}
\label{fig: IR relationship}
\end{figure}
\begin{figure}[!ht]
\includegraphics[width=0.5\textwidth]{IRrelation_diag01.pdf}
\includegraphics[width=0.5\textwidth]{IRrelation_diag02.pdf}
\includegraphics[width=0.5\textwidth]{IRrelation_diag03.pdf}
\includegraphics[width=0.5\textwidth]{IRrelation_diag04.pdf}
\caption{Diagnostic plots for linear regression used on IR sensor data as a function of distance. \textbf{top left:} Plot of residuals \textbf{top right:} quantile plot of residuals \textbf{bottom left:} scale-location plot, \textbf{bottom right:} Cook's distance (influence)}
\label{fig: IR diagnostics}
\end{figure}
\FloatBarrier

Gives output:

LaTeX output

EDIT: I've just seen Extra page at beginning of appendix containing big figures with the same problem. It offers another solution using minipage

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.