[Tex/LaTex] Two figures on the same line

floats

I am trying to get two pictures on the same line in LaTeX. I found some example on the Internet that works very well but there is some strange black frame around the pictures. Here is the code:

\begin{figure}[!htb]\centering
   \begin{minipage}{0.48\textwidth}
     \frame{\includegraphics[width=.7\linewidth]{RL.png}}
     \caption{Interpolation for Data 1}\label{Fig:Data1}
   \end{minipage}
   \begin {minipage}{0.48\textwidth}
     \frame{\includegraphics[width=.7\linewidth]{RC1.png}}
     \caption{Interpolation for Data 2}\label{Fig:Data2}
   \end{minipage}
\end{figure}

What can I do to remove them?

Best Answer

Delete the surrounding \frame{...} from your code; \frame is a kernel command which draws a tight frame around its argument.

Use \centering inside each minipage to center each image inside it, and optionally use \hfill between them; in this case, the external \centering is not required:

\documentclass{article}
\usepackage{graphicx}

\begin{document}

\begin{figure}[!htb]
   \begin{minipage}{0.48\textwidth}
     \centering
     \includegraphics[width=.7\linewidth]{example-image-a}
     \caption{Interpolation for Data 1}\label{Fig:Data1}
   \end{minipage}\hfill
   \begin{minipage}{0.48\textwidth}
     \centering
     \includegraphics[width=.7\linewidth]{example-image-b}
     \caption{Interpolation for Data 2}\label{Fig:Data2}
   \end{minipage}
\end{figure}

\end{document}

enter image description here