# Subfloat alignment: graphics and table on the same line

I'm trying to align an image and a table whithin the same figure, however, some alignment issues arise.

My code is:

\documentclass{article}
\usepackage{multirow}
\usepackage{amsbsy}
\usepackage{subfig}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{multirow}
\usepackage{amsbsy}
\usepackage{subfig}
\usepackage{booktabs}
\begin{document}
\begin{figure}[!htb]
\centering
\begin{tabular}{l}
\subfloat[]{
\includegraphics[height=4.5cm]{Figures/goldmine} \label{fig:goldmineGraphic}}
\subfloat[]{
%\input{Figures/Tikz/goldMineState.tex}\label{fig:goldMineState}}
\begin{tabular}{ll}
\toprule
Object & Attributes \\
\midrule
$miner1$ & $x=0,y=1$ \\
$miner2$ & $x=1,y=3$ \\
$miner3$ & $x=4,y=3$ \\
$gold1$ & $x=1,y=0$ \\
\multicolumn{2}{c}{$\vdots$} \\
$gold6$ & $x=4,y=2$ \\
$wall1$ & $x=1,y=1,pos=S$ \\
\multicolumn{2}{c}{$\vdots$}\\
$wall24$ & $x=4,y=4,pos=E$ \\
\bottomrule
\end{tabular}}
\end{tabular}
\caption{AA}
\label{fig:goldmine}
\end{figure}
\end{document}


which results in:

What I actually wanted is something like this, with the two subfloats (the graphic and the table) aligned horizontally (not overstepping each other):

Any idea of how to solve this?

You could choose adjustbox package as one of the options. The package provides \adjustbox command with lot of options. Here is the amended code for your requirement.

Note: I have added \usepackage{adjustbox} and \adjustbox{raise=-5pc} in this code.

\documentclass{article}
\usepackage{multirow}
\usepackage{amsbsy}
\usepackage{subfig}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{multirow}
\usepackage{amsbsy}
\usepackage{subfig}
\usepackage{booktabs}
\begin{document}
\begin{figure}[!htb]
\centering
\begin{tabular}{l}
\subfloat[]{
%\input{Figures/Tikz/goldMineState.tex}\label{fig:goldMineState}}
\begin{tabular}{ll}
\toprule
Object & Attributes \\
\midrule
$miner1$ & $x=0,y=1$ \\
$miner2$ & $x=1,y=3$ \\
$miner3$ & $x=4,y=3$ \\
$gold1$ & $x=1,y=0$ \\
\multicolumn{2}{c}{$\vdots$} \\
$gold6$ & $x=4,y=2$ \\
$wall1$ & $x=1,y=1,pos=S$ \\
\multicolumn{2}{c}{$\vdots$}\\
$wall24$ & $x=4,y=4,pos=E$ \\
\bottomrule
\end{tabular}}
\end{tabular}
\caption{AA}
\label{fig:goldmine}
\end{figure}
\end{document}