0

I used the following code to generate two figures in LaTeX. The height of 1 figure is slightly less than the other. how can I vary the height to match?

Figueres is in .png and of the same size but in the manuscript, they have different heights

\begin{figure}[ht]
\begin{minipage}[b]{0.45\linewidth}
\centering
\includegraphics[width=\textwidth]{filename1}
\caption{default}
\label{fig:figure1}
\end{minipage}
\hspace{0.5cm}
\begin{minipage}[b]{0.45\linewidth}
\centering
\includegraphics[width=\textwidth]{filename2}
\caption{default}
\label{fig:figure2}
\end{minipage}
\end{figure}
2
  • Welcome to the TeX.SE! If your images are really of the same size, as you claim in question, than they should have the same height. Since we haven't your pictures, we can reproduce your problem. Please show us result of your code fragment. With use of the example-image-a and example-image-b in your fragment, both images have the same height. – Zarko Jun 11 at 11:35
  • Try putting \fbox{..} around the images to show their actual sizes (\fboxsep=0pt). – John Kormylo Jun 11 at 15:29
0

Can you not just set the height explicitly? For example...

\includegraphics[height=8cm]{filename1}

Do that to both images, and they will be scaled to your desired height.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.