GeneralScaling landscape figure to page

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
vagus
Posts: 1
Joined: Sun Nov 30, 2008 12:52 pm

Scaling landscape figure to page

Post by vagus »

Hi

Hope someone can help me. I have just started using Latex and so far have been pleased with my progress. However, I have now hit a wall. I am writing my thesis in Latex and have a large number of figures that are to be presented on single pages in landscape. To do this I am using the rotating package. For example:

\usepackage{graphicx}
\usepackage{rotating}

...

\begin{sidewaysfigure}%
\centering
\includegraphics[width=\linewidth, height=12cm, keepaspectratio=true]{./Figures/ChapterThree/Figs/FigureChThreeQCBoxplots.eps}%
\caption{Boxplots of array quality ...}%
\label{fig:fftQCboxplot}%
\end{sidewaysfigure}%

My problem is that the figures are of various aspect ratios and sizes and the captions are of varying lengths. The maximum width for the figure is always the linewidth but the maximum height varies according to the caption length. What I want is for Latex to make the figure as big as possible on the page while leaving enough room for the caption.
I don't want to have to manually adjust the height for each figure independently (and can't imagine that Latex does not have a solution so that I don't have to), firstly beacuse it would take time, and secondly if I change the caption font at a later date I will have to go back through and change them all again.

Cheers.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Scaling landscape figure to page

Post by kaiserkarl13 »

Does this work?

Code: Select all

\includegraphics[width=\textwidth,height=\textheight,keepaspectratio]{./Figures/ChapterThree/Figs/FigureChThreeQCBoxplots}%
The graphicx package also allows the totalheight (height+depth) option for rotated figures.
Post Reply