# How do I put two different pictures side by side? [duplicate]

Possible Duplicate:
Two figures side by side

How do I put two different pictures side by side?

I'm using the figure environment. My code is:

\begin{figure}[h!]
\centering
\includegraphics[scale=0.2,keepaspectratio=true]{fase5.pdf}
\caption{Figura experimental. Nome fase4.pdf}
\label{fase1}
\end{figure}


After the response from @flh I tried the code below and failed.

\begin{figure}[h!]
\centering
\includegraphics{left}[scale=0.2,keepaspectratio=true]{fase5.pdf}
\caption{Figura experimental. Nome fase4.pdf}
\label{fase1}
\includegraphics{rigth}[scale=0.2,keepaspectratio=true]{fase5.pdf}
\caption{Figura experimental. Nome fase4.pdf}
\label{fase2}
\end{figure}

-

## marked as duplicate by Gonzalo Medina, percusse, cmhughes, lockstep, egregJun 20 '12 at 6:34

You may have become confused by @lfh's intended meaning of "left" and "right". The following MWE (minimum working example) explains the process in detail. The setup assigns each graphic a width of 0.48\textwidth; change this setup to meet your needs.

\documentclass{article}
\usepackage[demo]{graphicx} % remove 'demo' option for production version of file
\begin{document}

\begin{figure}[h!]
\begin{minipage}[t]{0.48\textwidth}
\includegraphics[width=\linewidth,keepaspectratio=true]{fase4.pdf}
\caption{Figura experimental}
\label{fase1}
\end{minipage}
\hspace*{\fill} % it's important not to leave blank lines before and after this command
\begin{minipage}[t]{0.48\textwidth}
\includegraphics[width=\linewidth,keepaspectratio=true]{fase5.pdf}
\caption{Altra figura experimental}
\label{fase2}
\end{minipage}
\end{figure}
\end{document}


-
Thank's @Mico! It worked. –  Elias Jun 20 '12 at 14:30

\begin{figure}