Graphics, Figures & TablesThree Figures side-by-side on landscape Page

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
aless80
Posts: 5
Joined: Fri Dec 02, 2011 1:03 pm

Three Figures side-by-side on landscape Page

Post by aless80 »

Hi, could somebody help me aligning three figures on a landscape page? The closer I get is with landscape, minipage and epsfig as in the example below, though I would rather do it with \includefigure
Thanks

Code: Select all

\documentclass[12pt,b5paper]{book}
\usepackage{lscape}
\usepackage{epsfig}
%\usepackage{rotating}
%\usepackage{graphicx}
%\usepackage{multirow}
\begin{document}

\begin{landscape}
\begin{figure}[h]
  \hfill
  \begin{minipage}[t]{.3\textwidth}
    \begin{center}  
      \epsfig{file=fig3.eps, scale=0.5}
      \caption{1 landscape minipage epsfigure}
      \label{fig-3}
    \end{center}
  \end{minipage}
  \hfill
  \begin{minipage}[t]{.35\textwidth}
    \begin{center}  
      \epsfig{file=fig4.eps, scale=0.5}
      \caption{2 landscape minipage epsfigure}
      \label{fig-4}
    \end{center}
  \end{minipage}
  \hfill
    \begin{minipage}[t]{.35\textwidth}
    \begin{center}  
      \epsfig{file=figs6/fig5.eps, scale=0.5}
      \caption{3 landscape minipage epsfigure}
      \label{fig-4}
    \end{center}
  \end{minipage}
\end{figure}
\end{landscape}
\end{document}
Attachments
alignedTables.pdf
landscape page with three figures
(96.39 KiB) Downloaded 423 times

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Three Figures side-by-side on landscape Page

Post by localghost »

The epsfig package is obsolete and replaced by the graphicx package [1]. After some modifications I have no problem with the example below (except for some warnings).

Code: Select all

\documentclass[12pt,b5paper]{book}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{rotating}

\begin{document}
  \begin{sidewaysfigure}
    \begin{minipage}[t]{.3\textwidth}
      \centering
      \includegraphics[scale=0.5]{fig3}
      \caption{1 landscape minipage epsfigure}
      \label{fig-3}
    \end{minipage}
    \hfill
    \begin{minipage}[t]{.3\textwidth}
      \centering
      \includegraphics[scale=0.5]{fig4}
      \caption{2 landscape minipage epsfigure}
      \label{fig-4}
    \end{minipage}
    \hfill
    \begin{minipage}[t]{.3\textwidth}
      \centering
      \includegraphics[scale=0.5]{figs6/fig5}
      \caption{3 landscape minipage epsfigure}
      \label{fig-5}
    \end{minipage}
  \end{sidewaysfigure}
\end{document}
For your purpose it's perhaps better to use the floatrow package for aligning several floats in a row.

Code: Select all

\documentclass[12pt,b5paper]{book}
\usepackage[T1]{fontenc}
\usepackage[margin=1cm]{geometry}
\usepackage{floatrow}
\usepackage[demo]{graphicx}
\usepackage{rotating}

\begin{document}
  \begin{sidewaysfigure}
    \begin{floatrow}
      \ffigbox[\FBwidth]{\caption{First landscape minipage figure}\label{fig-3}}{%
        \includegraphics[scale=0.5]{fig3}
      }
      
      \ffigbox[\FBwidth]{\caption{Second landscape minipage figure}\label{fig-4}}{%
        \includegraphics[scale=0.5]{fig4}
      }
      \ffigbox[\FBwidth]{\caption{Third landscape minipage figure}\label{fig-5}}{%
        \includegraphics[scale=0.5]{figs6/fig5}
      }
    \end{floatrow}
  \end{sidewaysfigure}
\end{document}
For details please refer to the package manual.

[1] View topic: Obsolete Packages and Document Classes — Avoid Usage!


Thorsten
aless80
Posts: 5
Joined: Fri Dec 02, 2011 1:03 pm

Re: Three Figures side-by-side on landscape Page

Post by aless80 »

Thank you very much for the answer, the second example is the closest to what I would like to get, but
1) I cannot display the figure, I get a black quare
2) I cannot resize the figures
User avatar
sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Three Figures side-by-side on landscape Page

Post by sommerfee »

aless80 wrote:1) I cannot display the figure, I get a black quare
This is because of the "demo" package option passed to the graphicx package. It's very useful for MWEs (since no-one on this forum have your graphic files) but of course not useful for the real document.

So simply drop this option and you'll have your images back.
aless80
Posts: 5
Joined: Fri Dec 02, 2011 1:03 pm

Re: Three Figures side-by-side on landscape Page

Post by aless80 »

thank you, it is starting to work! Now I am trying to understand how to fix the width of the figures. The manual is so long and complicated.
Post Reply