Graphics, Figures & TablesArrangement of three figures

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
tja
Posts: 1
Joined: Mon Jun 17, 2013 7:27 pm

Arrangement of three figures

Post by tja »

Hi,

My problem is that I want to place three pictures in the same figure. Normally I just use the subfigure package, which works fine. This time however I have one long figure and two small, which I would like to place in the same way as in the attached sketch.

Is there an easy way to do this, still using the subfigure package?

I have searched google and this forum, without any success. Hope someone can help :)

Eventhough I don't see any reason to include code in this case, I have included my standard subfigure code, which just put all the picture side-by-side:

Code: Select all

\begin{figure}[h!]
\centering
\subfigure[]{\includegraphics[scale=1]{LongFigure}}
\subfigure[]{\includegraphics[scale=1]{SmallFigure1}}
\subfigure[]{\includegraphics[scale=1]{SmallFigure2}}
\caption{}
\end{figure}
Attachments
Example.png
Example.png (3.62 KiB) Viewed 37848 times

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

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

Arrangement of three figures

Post by localghost »

tja wrote:[…] Is there an easy way to do this, still using the subfigure package? […]
The subfigure package is obsolete for a long time. Its direct successor is subfig. With this it needs only a few code modifications.

I'm quite sure that this has been already solved here, but I can't find it at the moment. So, take a look at the below code based on the subcaption package (from the caption bundle).

Code: Select all

\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage{subcaption}

\begin{document}
  \begin{figure}[!htb]
    \centering
    \begin{subfigure}[b]{0.45\textwidth}
	  \rule{\linewidth}{\dimexpr 2\linewidth+2\baselineskip+6pt}
      \caption{First}\label{subfig-1:dummy}
    \end{subfigure}
    \hfill
    \begin{minipage}[b]{0.45\textwidth}
      \begin{subfigure}[b]{\linewidth}
	    \rule{\linewidth}{\linewidth}
        \caption{Second}\label{subfig-2:dummy}
      \end{subfigure}\\[\baselineskip]
      \begin{subfigure}[b]{\linewidth}
	    \rule{\linewidth}{\linewidth}
        \caption{Third}\label{subfig-3:dummy}
      \end{subfigure}
    \end{minipage}
    \caption{Dummy figure}\label{fig:dummy}
  \end{figure}
\end{document}
Replace the \rule commands by corresponding code for your document. For detail refer to the manuals of the involved packages.
tja wrote:[…] Eventhough I don't see any reason to include code in this case, I have included my standard subfigure code, which just put all the picture side-by-side […]
A code example is essential to show what you have tried so far. Code snippets are not very helpful for getting a clue because people are rarely motivated to write something from scratch. So, next time please prepare a self-contained and minimal example to give an adequate problem description. In this case you were saved by the bell because I found something in my archives.


Best regards and welcome to the board
Thorsten
vignesh
Posts: 1
Joined: Wed Mar 20, 2019 9:40 am

Arrangement of three figures

Post by vignesh »

Is there a way to do this without using minipage? The subcaption package doesn't work well with subfig.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10334
Joined: Mon Mar 10, 2008 9:44 pm

Arrangement of three figures

Post by Stefan Kottwitz »

Use either subcaption or subfig, but not both in the same document, since they are for the same purpose. I would prefer subcaption since it's integrated with the useful caption package, and I think subcaption has better hyperref/hyperlink support.

Stefan
LaTeX.org admin
Post Reply