0

So I wanted to show two pictures side by side, put captions below them and then replace some text inside.

This is what I have done:

\documentclass[a4paper,12pt]{article}


\usepackage{fullpage}
\usepackage[utf8]{inputenc}
\usepackage{amssymb, amsmath, amsthm}
\usepackage{psfrag, graphicx}

\begin{document}
\begin{figure}
\centering
\begin{minipage}[c]{.5\textwidth}
  \includegraphics[width=1\linewidth]{convplot1}
  \caption{first figure}
  \label{fig:1}
\end{minipage}%
\begin{minipage}[c]{.5\textwidth}
  \includegraphics[width=1\linewidth]{convplot2}
  \caption{second figure}
  \label{fig:2}
\end{minipage}
\end{figure}


\end{document}

I would like to have the captions show up right below, while using the minipage environment, but what it actually gives me is this:

I am not quite sure how to fix it, so any help is greatly appreciated!

Jack4t3
  • 101
  • 2
    Probably there is a lot of whitespace in the figures themselves, so you just need to crop them. – Torbjørn T. Jun 20 '17 at 10:32
  • It seems that your pictures are that high. When I try your code, it places the captions right below the pictures. You also don't need \centering command. – Michael Fraiman Jun 20 '17 at 10:36
  • @TorbjørnT. Thanks a lot, I did not realise it used a pdf version of the image which does indeed have a lot of whitespace – Jack4t3 Jun 20 '17 at 10:38
  • Are those PDFs from Matlab by any chance? If so, https://tex.stackexchange.com/questions/5559 and https://tex.stackexchange.com/questions/3995 may be of interest. – Torbjørn T. Jun 20 '17 at 10:46
  • @TorbjørnT. Yes they are! Thank you very much – Jack4t3 Jun 20 '17 at 10:46

0 Answers0