LaTeX forum ⇒ Graphics, Figures & TablesArrangement of three figures Topic is solved

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

Arrangement of three figures

Postby tja » Mon Jun 17, 2013 7:52 pm

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:

  1. \begin{figure}[h!]
  2. \centering
  3. \subfigure[]{\includegraphics[scale=1]{LongFigure}}
  4. \subfigure[]{\includegraphics[scale=1]{SmallFigure1}}
  5. \subfigure[]{\includegraphics[scale=1]{SmallFigure2}}
  6. \caption{}
  7. \end{figure}
Attachments
Example.png
Example.png (3.62 KiB) Viewed 22126 times

Tags:

User avatar
localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm

Postby localghost » Mon Jun 17, 2013 8:30 pm

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).
  1. \documentclass[12pt]{article}
  2. \usepackage[T1]{fontenc}
  3. \usepackage{subcaption}
  4.  
  5. \begin{document}
  6. \begin{figure}[!htb]
  7. \centering
  8. \begin{subfigure}[b]{0.45\textwidth}
  9. \rule{\linewidth}{\dimexpr 2\linewidth+2\baselineskip+6pt}
  10. \caption{First}\label{subfig-1:dummy}
  11. \end{subfigure}
  12. \hfill
  13. \begin{minipage}[b]{0.45\textwidth}
  14. \begin{subfigure}[b]{\linewidth}
  15. \rule{\linewidth}{\linewidth}
  16. \caption{Second}\label{subfig-2:dummy}
  17. \end{subfigure}\\[\baselineskip]
  18. \begin{subfigure}[b]{\linewidth}
  19. \rule{\linewidth}{\linewidth}
  20. \caption{Third}\label{subfig-3:dummy}
  21. \end{subfigure}
  22. \end{minipage}
  23. \caption{Dummy figure}\label{fig:dummy}
  24. \end{figure}
  25. \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
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

vignesh
Posts: 1
Joined: Wed Mar 20, 2019 9:40 am

Postby vignesh » Wed Mar 20, 2019 9:42 am

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: 9406
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Wed Mar 20, 2019 10:37 pm

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
Site admin


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 2 guests