Graphics, Figures & Tablesfigure array package ?

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
juliette
Posts: 75
Joined: Thu Nov 20, 2008 10:15 pm

figure array package ?

Post by juliette »

Hello,
My problem with the subfig package is that I have to resize all my pictures myself.

Is there a package out there, where I can make an array of pictures (for example, let's say I wanted a 3x5 array of pictures where each picture comes out the same size even though the files are all different sizes). Is there a package that will automatically resize all my pictures for me in such a way that this 3x5 array of pictures will take up the whole page and nothing more ??

This would be similar to the subplot command in matlab.

Thank you!
xoxo

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

php1ic
Posts: 192
Joined: Wed Jan 28, 2009 8:17 pm

figure array package ?

Post by php1ic »

With the graphicx package you can set the width/height of each picture as a fraction of the text width/height. Using your 3x5 as an example

Code: Select all

\documentclass{article}

\usepackage{subfig,graphicx}

\begin{document}

\begin{figure}
\centering
\subfloat[subcaption]{\includegraphics[width=0.3\textwidth, height=0.15\textheight]{file.eps}}
\subfloat[]{\includegraphics[width=0.3\textwidth, height=0.15\textheight]{file.eps}}
\subfloat[]{\includegraphics[width=0.3\textwidth, height=0.15\textheight]{file.eps}}\\
\subfloat[]{\includegraphics[width=0.3\textwidth, height=0.15\textheight]{file.eps}}
\subfloat[]{\includegraphics[width=0.3\textwidth, height=0.15\textheight]{file.eps}}
\subfloat[]{\includegraphics[width=0.3\textwidth, height=0.15\textheight]{file.eps}}\\
\subfloat[]{\includegraphics[width=0.3\textwidth, height=0.15\textheight]{file.eps}}
\subfloat[]{\includegraphics[width=0.3\textwidth, height=0.15\textheight]{file.eps}}
\subfloat[]{\includegraphics[width=0.3\textwidth, height=0.15\textheight]{file.eps}}\\
\subfloat[]{\includegraphics[width=0.3\textwidth, height=0.15\textheight]{file.eps}}
\subfloat[]{\includegraphics[width=0.3\textwidth, height=0.15\textheight]{file.eps}}
\subfloat[]{\includegraphics[width=0.3\textwidth, height=0.15\textheight]{file.eps}}\\
\subfloat[]{\includegraphics[width=0.3\textwidth, height=0.15\textheight]{file.eps}}
\subfloat[]{\includegraphics[width=0.3\textwidth, height=0.15\textheight]{file.eps}}
\subfloat[]{\includegraphics[width=0.3\textwidth, height=0.15\textheight]{file.eps}}\\
\caption{main caption}
\end{figure}

\end{document}
Is this what you wanted, or did you want something more general that calculates the widths and heights automatically?
juliette
Posts: 75
Joined: Thu Nov 20, 2008 10:15 pm

Re: figure array package ?

Post by juliette »

Thanks a lot,
That was helpful.
I was actually looking at something automatic like the subplot command in matlab, but this is doing the trick, so I won't complain!

Thanks
Post Reply