I am struggling to align figure next to table. The code is taken from here and it is:
\begin{minipage}{\textwidth}
\begin{minipage}[b]{0.49\textwidth}
\centering
\includegraphics[width=0.6\linewidth]{figures/strategy_I_no_filter_ROC}
\captionof{figure}{A figure beside a figure}
\end{minipage}
\hfill
\begin{minipage}[b]{0.49\textwidth}
\centering
\begin{tabular}{|c|c|c|}\hline
Strategy & I & II \\\hline
precision$_0$ & 0.769 & 0.783\\
precision$_1$ & 0.806 & 0.793\\
recall$_0$ & 0.804 & 0.796\\
recall$_1$ & 0.769 & 0.774\\
f$_1^{macro}$ & 0.788 & 0.786\\
AUC & 0.849 & 0.855\\\hline
\end{tabular}
\captionof{table}{Classification results of normal intervals versus precursors to depression.}
\end{minipage}
\end{minipage}
here is my ugly result:
- How to align captions? The table caption contains two rows and it goes up.
- How to make the figure the same size as the table? Without chasing every single millimeter of its size.
- How to crop white space around the figure (there is some distance between the caption and figure. I would like to 'zoom-in' the figure, to make it bigger.
EDIT
Thanks to great answer, but the figure is squashed. Any ideas?



tabularwith bottom alignment. In that case,\ht\mytablecontentwill only obtain half of the required value, because the rest will be "depth" instead of "height". – Steven B. Segletes May 17 '17 at 11:11[b]from thetabularconstruction in\mytable, I get your edited figure aspect. So don't forget the[b]in yourtabularconstruction. – Steven B. Segletes May 17 '17 at 11:19