Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question

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

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

add comment

2 Answers 2

up vote 3 down vote accepted

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}

enter image description here

share|improve this answer
    
Thank's @Mico! It worked. –  Elias Jun 20 '12 at 14:30
add comment

Start with this:

\begin{figure}
\includegraphics{left}
\includegraphics{right}
\end{figure}

This will produce two pictures in the same figure. If you want one figure for each picture, you may need to use two minipages.

share|improve this answer
    
See also tex.stackexchange.com/questions/3770/… –  lhf Jun 20 '12 at 1:11
    
Thanks for the tip. But I tried to put the code below. And it did not work. My code: –  Elias Jun 20 '12 at 1:20
add comment

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