# Bad spacing of table inside subfigure

I have a figure setup as follows:

\begin{figure*}[t!]
\centering
\subfigure[Part 1]
{
\includegraphics*[totalheight=2in,origin=c]{ost100}
}
\subfigure[Part 2]
{
\includegraphics*[totalheight=2in,origin=c]{bay}
}
\subfigure[Part 3]
{
\small
\begin{tabular}{| l | c | r | r | } \hline
{...}
\hline
\end{tabular}
}
\caption{The main experiment.\label{f:main}}
\end{figure*}


For some reason, my table ends up shifted far below the images in part 1 and 2, with about a 1/2 inch margin above it. Shrinking the images doesn't change this. Any idea what is going wrong and how to fix it?

-
subfigure is obsolete. You should consider using subfig instead. –  TH. Feb 6 '11 at 7:32
My collaborators made the subfigure decision. Can you recommend good documentation/examples. A quick test didn't let subfig and subfigure play nicely together. –  Nathan S. Feb 6 '11 at 7:41
The subfigure and subfig packages are incompatible, so you can only use one of them. It's not clear to me why your collaborators made a decision using a package which is obsolete (and was superseeded by the subfig package of the same author) for more than 7 years. –  Axel Sommerfeldt Feb 6 '11 at 9:01

The tabular environment accepts an optional parameter for alignment with respect to the current line.

\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[demo]{graphicx}
\usepackage{subfig}

\begin{document}
\begin{figure*}[!ht]
\centering
\subfloat[Part 1]{%
\includegraphics*[totalheight=1in,origin=c]{ost100}
}
\subfloat[Part 2]{%
\includegraphics*[totalheight=1in,origin=c]{bay}
}
\subfloat[Part 3]{%
\small
\begin{tabular}[b]{|l|r|} \hline
Some Values & Some Values \\
Some Values & Some Values \\
Some Values & Some Values \\
Some Values & Some Values \\
Some Values & Some Values \\ \hline
\end{tabular}
}
\caption{The main experiment.}\label{fig:main}
\end{figure*}
\end{document}


Note that the example uses the subfig package instead oth the obsolete subfigure (see comments).

The demo option for the graphicx package was necessary because your graphics files where not present. Just drop it later.

-
I didn't know about the [b] parameter. That fixed the problem. (Of course, everyone is right -- we shouldn't be using subfigure, but I'll let my co-author deal with that.) –  Nathan S. Feb 6 '11 at 21:53
\documentclass[a4paper]{article}
\usepackage[demo]{graphicx}
\usepackage{subfig}

\begin{document}

\begin{figure*}[!ht]
\centering
\subfloat[Part 1]{\includegraphics*[width=0.3\linewidth]{ost100}}\hfill
\subfloat[Part 2]{\includegraphics*[width=0.3\linewidth]{bay}}   \hfill
\subfloat[Part 3]{\small
\begin{tabular}[b]{| l | c | r | r | } \hline
foo&bar&baz&foo \\\hline
foo&bar&baz&foo \\\hline
foo&bar&baz&foo \\\hline
\end{tabular}}
\caption{The main experiment.\label{f:main}}
\end{figure*}

\end{document}


-