6

I have two figures I want them to be side-by-side, and I have two issues:

1) How to make both figures have the same size? I know that dimensions are not the same for both figures, but how can I make them the same? (both figures are in pdf format)

2) I want to include one caption for both figures.. say, Figure 1, but underneath the figure on the left side I want to put (a), and underneath the figure on right side I want to put (b).. so we have figure 1(a) and Figure 1(b).

This is ehat I have so far:

\begin{figure}
\centering
\mbox{\subfigure{\includegraphics[scale=0.5]{Figure1_a.pdf}
\quad
\subfigure{\includegraphics[scale=0.5]{Figure1_b.pdf} }}}
\caption{caption for figure 1}
\label{fig12}
\end{figure}
6
  • 2
    This might habe been answered here: tex.stackexchange.com/q/37581/21591
    – mafp
    Commented Feb 11, 2013 at 0:19
  • Thanks, but how can i resize both figures to be the same?
    – user9292
    Commented Feb 11, 2013 at 0:32
  • 2
    use height=5cm instead of scale=... Commented Feb 11, 2013 at 0:33
  • I tried it, but still getting different heights...
    – user9292
    Commented Feb 11, 2013 at 0:47
  • If you are getting different heights, it means that the bounding boxes aren't tight (white space above/below what you consider to be the figure). Where do the figures come from?
    – vonbrand
    Commented Feb 11, 2013 at 1:52

1 Answer 1

5

With graphicx you can set the width of the figure.

So you should do something like

\documentclass{article}
\usepackage{graphicx}
\pagestyle{empty}
\begin{document}

Same width

\includegraphics[width=2cm]{example-image-16x10}

\includegraphics[width=2cm]{example-image-10x16}
\vspace{1cm}

Same height

\begin{minipage}[t]{2in}
     \hspace*{\fill}\includegraphics[height=3cm]{example-image-16x10}\hspace*{\fill}\par
     \hspace*{\fill}Caption for first\hspace*{\fill}
\end{minipage}
\begin{minipage}[t]{2in}
    \hspace*{\fill}\includegraphics[height=3cm]{example-image-10x16}\hspace*{\fill}\par
     \hspace*{\fill}Caption for second\hspace*{\fill}
\end{minipage}
\vspace{1cm}

Same height and width (ick!)

\includegraphics[height=3cm,width=2cm]{example-image-16x10}
\includegraphics[height=3cm,width=2cm]{example-image-10x16}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .