place multiple images on one line in latex (or even create a matrix of images)
to tile images in a figure, use the following code:
\begin{figure}[h]to place more than 2 images on a line, add extra 'c's to the {array} specification and follow each \includegraphics[]{} with an ampersand (&). to create a matrix of images, insert newlines using two slashes: for instance, to make a 2X2 matrix of images:
\begin{center}$
\begin{array}{cc}
\includegraphics[width=2.5in]{image1.jpg} &
\includegraphics[width=2.5in]{image2.jpg}
\end{array}$
\end{center}
\caption{my caption}
\end{figure}
\begin{figure}[h]
\begin{center}$
\begin{array}{cc}
\includegraphics[width=2.5in]{image1.jpg} &
\includegraphics[width=2.5in]{image2.jpg} \\ \includegraphics[width=2.5in]{image1.jpg} &
\includegraphics[width=2.5in]{image2.jpg}
\end{array}$
\end{center}
\caption{my caption}
\end{figure}
4 Comments:
Hey man, good website with very useful information on latex.
Good luck with your PhD in MIT.
Bidur Khanal
Research student
University if southampton, UK
Hello Man,
Thanks for the nice code.
All the best.
Charles
You mention it in the main text of your message, but it is not in the code - that you need two slashes (\\), code only has one
Works great then.
thanks for catching that - i've updated the code!
Post a Comment
Links to this post:
Create a Link
<< Home