LaTeX forum ⇒ Graphics, Figures & TablesSubfigure positions Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
Posts: 5
Joined: Fri Aug 11, 2017 3:15 pm

Subfigure positions

Postby kaszpore » Fri Aug 11, 2017 3:26 pm

Hi Everybody,

I need some help with positioning figures using subfigure. I have two figures, Fig1 and Fig2, I want them in the same {figure} environment, appearing next to each other. The problem is that Fig2 is considerably smaller along the vertical direction, and hence it is shifted upwards with respect to Fig1. It looks incredibly clumsy. I would like to match the bottom of the two figures, so the captions are aligned.

How can I do that?

Many thanks in advance!

User avatar
Site Moderator
Posts: 3639
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Fri Aug 11, 2017 6:41 pm

Welcome, can you show us the code to reproduce your actual case?
Package subfigure is deprecated for more than a decade now. These days, people would use the subcaption package.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Posts: 5
Joined: Fri Aug 11, 2017 3:15 pm

Postby kaszpore » Sun Aug 13, 2017 10:15 pm

Here is the code:
  1. \begin{figure}
  2. \begin{subfigure}{0.5\textwidth}
  3. \centering
  4. \includegraphics[scale=0.5]{Fig1.pdf}
  5. \caption{qwert}
  6. \label{fig:Fig1}
  7. \end{subfigure}
  8. \begin{subfigure}{0.5\textwidth}
  9. \centering
  10. \includegraphics[scale=0.5]{Fig2.pdf}
  11. \caption{asdfg}
  12. \label{fig:Fig2}
  13. \end{subfigure}
  14. \end{figure}

I am sorry, I am quite new to LaTeX, this is the first time I try do do this. I was not aware that subfigure is deprecated. I would gladly switch to the recommended package.

Posts: 151
Joined: Sun Nov 16, 2014 8:51 pm

Postby rais » Mon Aug 14, 2017 7:30 am

Your code snippet looks to me like you're already using the right package (subcaption).
What you're looking for is called \subcaptionbox, if I understand you correctly.
See in `texdoc subcaption' the description to \subcaptionbox---there's a nice example with a cat and an elephant ;)


Posts: 5
Joined: Fri Aug 11, 2017 3:15 pm

Postby kaszpore » Mon Aug 14, 2017 6:26 pm

That's exactly what I was looking for! Thank you so much!

Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 2 guests