I want to have a \bordermatrix environment in a subfigure to show the correspondence between an incidence graph (which is a tikzpicture - I'm sure it's irrelevant to the problem) and the incidence matrix. The two figures are next to each other (as expected), but the math environment creates a (huge) white space (margin) above. Please see the code and the screenshot below.
\begin{figure}
\centering
\subfigure[bipartiter Inzidenzgraph\newline (\emph{bipartite Anordnung})]{
\fbox{
\plotungerichteterHGInzidenzBipartit % a tikzpicture
}
}
\subfigure[Inzidenzmatrix] {
\fbox{
\resizebox{4cm}{!}{
$\bordermatrix{
&v_1&v_2&v_3 &v_4&v_5 \cr
e_1& 1 & 1 & 0 & 1 & 1 \cr
e_2& 1 & 1 & 1 & 0 & 0 \cr
e_3& 0 & 0 & 1 & 0 & 1 \cr
e_4& 0 & 0 & 0 & 1 & 0}$
}
}
}
\caption[Darstellungsformen eines Hypergraphen]{Darstellungsformen eines Hypergraphen}
\label{fig:ungerichteterHG}
\end{figure}
As you can see, I added fboxes to show that the scope of the figures are as expected. These as well as the resizebox are not the problem (I removed them, same issue).
.
Actually in the above code there is no newline between the subfigures so that they are next to each other. But, interestingly, if I would place the matrix beneath the subfigure (by adding that new line) I will get the following and as you can see, this mysterious white space is gone:
.
So why would there be whitespace above the matrix only if I place them next to each other, but everything as expect in case I place them above each other?
