Total Pageviews

Wednesday, 3 August 2011

Two Figures Side-by-Side in Latex

Many times you can come across a situation where you need to put two figures side-by-side in a paper written in latex format. Well, of course, they are two different figures: one is say Figure 1 and the other is say Figure 2. How are you going to achieve this? Well, simply the following latex code helps.



\begin{figure}[b]
\begin{minipage}[t]{0.48\linewidth}
\centering
\includegraphics[scale=0.4]{\string"Path and file name without extension\string".pdf}
\caption{Number of new connections in five chunks for six papers on Ischemia
and Glutamate}
\label{fig:figure1}
\end{minipage}
\hspace{0.5cm}
\begin{minipage}[t]{0.48\linewidth}
\centering
\includegraphics[scale=0.4]{\string"Path and file name without extension\string".pdf}
\caption{Number of dropped connections in five chunks for six papers on Ischemia
and Glutamate}
\label{fig:figure2}
\end{minipage}
\end{figure}


The thing to remember is to create minipages. One minipage serves the purpose of putting one figure. All you need to adjust here is the position of the figure (here, I chose the bottom of the page), position of the linewidth of the minipage (mine here is 0.48, yours definitely depend on the page size), and the graphics size.

No comments:

Post a Comment