# Vertical alignment of table and figure placed side-by-side in two-column mode

I'm using IEEE's spconf.sty file to create a two-column document. I am placing a table with its caption above and a figure with two subfigures with their captions below side-by-side using the floatrow package. I want the bottom of the table to align with the bottom of the caption. The command \BottomFloatBoxes aligns the bottom of the table with the top of the figure caption.

\documentclass{article}
\usepackage{spconf,amsmath,graphicx}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{subcaption}
\usepackage{floatrow}   % for placing table and figure side-by-side

\begin{document}
\begin{figure*}\BottomFloatBoxes
\begin{floatrow}
\ttabbox[0.75\Xhsize]
{\centering
\begin{tabular}{ccccccccc}%
\toprule
\multicolumn{3}{c}{Linear} & \multicolumn{3}{c}{RBF} & \multicolumn{3}{c}{Polynomial} \\
\midrule
$C$   & $\gamma$ & Accuracy (\%) & $C$   & $\gamma$ & Accuracy (\%) & $d$   & $\gamma$ & Accuracy (\%) \\
\midrule
0  & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0  & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0  & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0  & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0  & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0  & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0  & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0  & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0  & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0  & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
\bottomrule
\end{tabular}}%
{\caption{Classification results for different SVM kernels}
\label{tab:results}}%
\killfloatstyle\ffigbox[\Xhsize]
{\begin{subfloatrow}
\ffigbox[0.5\Xhsize]
{\caption{}
\label{fig:models:subfig:good}}
{\includegraphics[width=\linewidth]{box.png}}
\ffigbox[\Xhsize]
{\caption{}
{\includegraphics[width=\linewidth]{box.png}}
\end{subfloatrow}}
{\caption{Examples of models. \ref{fig:models:subfig:good} is predicted as good' and \ref{fig:models:subfig:bad} is predicted as bad'.}
\label{fig:models}}
\end{floatrow}
\end{figure*}%
\end{document}


Using the above MWE gives me the following output:

For someone who wants to reproduce this MWE, the style file spconf.sty can be found here.

I would avoid floatrow if possible. Also, I couldn't find spfconf.sty. Getting the figure counter right was a bit of a kludge. Note: you can use \subref and lose the figure number.

\documentclass[twocolumn]{article}
\usepackage{amsmath,graphicx}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{subcaption}

\begin{document}
\begin{figure*}
\sbox0{\begin{tabular}[b]{ccccccccc}%
\toprule
\multicolumn{3}{c}{Linear} & \multicolumn{3}{c}{RBF} & \multicolumn{3}{c}{Polynomial} \\
\midrule
$C$   & $\gamma$ & Accuracy (\%) & $C$   & $\gamma$ & Accuracy (\%) & $d$   & $\gamma$ & Accuracy (\%) \\
\midrule
0  & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0  & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0  & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0  & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0  & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0  & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0  & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0  & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0  & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0  & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
\bottomrule
\end{tabular}}%
\begin{minipage}[b]{\wd0}
\captionof{table}{Classification results for different SVM kernels}
\label{tab:results}%
\usebox0
\end{minipage}\hfill
\begin{minipage}[b]{\dimexpr \textwidth-\wd0-\columnsep}
\stepcounter{figure}%
\begin{subfigure}{.45\linewidth}
\includegraphics[width=\linewidth]{example-image}
\caption{}\label{fig:models:subfig:good}
\end{subfigure}\hfil
\begin{subfigure}{.45\linewidth}
\includegraphics[width=\linewidth]{example-image}
\caption{Examples of models. \ref{fig:models:subfig:good} is predicted as good' and \ref{fig:models:subfig:bad} is predicted as bad'.}

• Worked like a charm! Why do you not recommend floatrow? – niranjantdesai Jan 19 '18 at 9:40