I have four tables on one line that I would like to refer to as separate figures. I would like them to appear like this:
This is how the tables currently appear:
\begin{table}[h!]
\medskip
\begin{tabular}{|c|c|c|}
\hline
-1 & -1 & -1 \\ \hline
2 & 2 & 2 \\ \hline
-1 & -1 & -1 \\
\hline
\end{tabular}
\hfill
\begin{tabular}{|c|c|c|}
\hline
2 & -1 & -1 \\ \hline
-1 & 2 & -1 \\ \hline
-1 & -1 & 2 \\
\hline
\end{tabular}
\hfill
\begin{tabular}{|c|c|c|}
\hline
-1 & 2 & -1 \\ \hline
-1 & 2 & -1 \\ \hline
-1 & 2 & -1 \\
\hline
\end{tabular}
\hfill
\begin{tabular}{|c|c|c|}
\hline
-1 & -1 & 2 \\ \hline
-1 & 2 & 1 \\ \hline
2 & -1 & -1 \\
\hline
\end{tabular}
\captionof{figure}{Masks for line detection} \label{table:mul}
\end{table}
I want to caption each of the tables with (a) text, (b) text, ect.
What is the proper way to do this, so that I can caption each of the tables, but referenced as figures?


