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.

I've got 3x3 images that I'd like to arrange in a table with row and column headings. All images have the same dimensions. I still want the caption to read "Figure 1.1" and not "Table 1.1".

One way I've come up with would be to make a table with \includegraphics in most cells, and then figure out how to change the caption to "Figure". Another way would be to arrange the pictures in a TikZ matrix.

desired outcome

What would be the best solution?

share|improve this question
1  
@TimN Maybe you can post your solution. Keep in mind that it's by no means required for \includegraphics to be in a figure environment. –  egreg May 26 '13 at 22:20
add comment

1 Answer

While a figure environment is intended for images and graphics, it is not limited to that, so there is nothing wrong with having a tabular within a figure environment. (Also, as egreg mentioned, an \includegraphics is by no means limited to being within a figure.)

Therefore, you can use standard tabular to lay out your images. An example is below, where I also used the adjustbox package to vertically center the images, as in e.g. http://tex.stackexchange.com/a/46390/586 (The image used is from the mwe package, so if that is installed the code should compile directly.)

\documentclass{article}
\usepackage{graphicx}
\usepackage{adjustbox}
\newcommand\animage{\adjustbox{valign=m,vspace=1pt}{\includegraphics[width=.2\linewidth]{example-image}}}
\begin{document}
\begin{figure}
\centering
\begin{tabular}{cccc}
       & Column 1 & Column 2 & Column 3 \\
Row 1  & \animage & \animage & \animage \\
Row 2  & \animage & \animage & \animage \\
Row 3  & \animage & \animage & \animage 
\end{tabular}
\caption{Figures}
\end{figure}
\end{document}

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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