7

I am tryint to get two pictures on the same line in LaTeX. I found some example on the internet that workes 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}
14

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

|improve this answer|||||

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.