# Creating a figure, with subfigures on the same page as a table

I have a figure with multiple subfigures and a related table that I want to appear directly below them.

I have been experimenting with code from this question but its not for figures with subfigures and I so far can't get a solution to work.

Any ideas of how to do this?

(an attempt)

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage[labelformat=simple]{subcaption}
\renewcommand\thesubfigure{(\alph{subfigure})}
\renewcommand\thesubtable{(\alph{subtable})}

\begin{document}

\begin{minipage}{\linewidth}
\begin{figure}
%\centering
\begin{subfigure}[b]{0.49\textwidth}
\includegraphics[scale=0.17]{LwT2_3d_statespace1.png}
%\label{LwT1AssPhase}
\end{subfigure}
\begin{subfigure}[b]{0.49\textwidth}
\includegraphics[scale=0.17]{LwT2_3d_statespace2.png}
%\label{LwT1DissPhase}
\end{subfigure}
\begin{subfigure}[b]{0.5\textwidth}
\includegraphics[scale=0.17]{LwT2_3d_statespace3.png}
%\label{LwT1AssPhase}
\end{subfigure}
\begin{subfigure}[b]{0.49\textwidth}
\includegraphics[scale=0.17]{LwT2_3d_statespace4.png}
%\label{LwT1DissPhase}
\end{subfigure} \caption[Visualisations of a solution trajectory for the Langmuir two concentration model in the association phase]{Visualisations of a solution trajectory for the Langmuir two concentration model in the association phase (cyan) alongside nullcline-planes $x_1$ in blue, $x_2$ in red, $C$ in green}
\label{LwT2PhasePort}
\end{figure}
\begin{table}
\centering
\footnotesize
\setlength{\extrarowheight}{1.5pt}
\begin{tabular}
{ | c | c | c | c | c | c |c |c |c |  }
\hline
Parameter                      &$k_{a1}$              & $k_{a2}$       & $k_{d1}$& $k_{d2}$&     $R$            & $C_T$ & $k_m$                                         & $h$ \\%\hline
&M$^{-1}$s$^{-1}$      &M$^{-1}$s$^{-1}$&s$^{-1}$ &s$^{-1}$ & pg nm$^{-2}$       & nM    &  pgnm$^{-2}$ M$^{-1}$s$^{-1}$                  &pgnm$^{-2}$ M$^{-1}$ \\\hline%\hline
Value                          &6E-4                  &5E-4            &7E-3     &1E-2     & 500                &  100  & 10$^{-4}$                                     & 10$^{-6}$  \\\hline
\end{tabular}
\caption{Values taken by parameters in Fig. \ref{LwT2PhasePort} and  \ref{LwT2dPhasePort}}%add key
\label{tab:LwTsols}
\end{table}
\end{minipage}

\end{document}




• please, show us what you try so far. in form of small but complete document. without seeing it we can't help you. Sep 14 '18 at 20:25
• just added. I thought my code was too wrong to be a useful starting point Sep 14 '18 at 20:45
• Note that figures and tables are primarily floats and secondarily have captions. Subfigures are just minipages with different captions. Sep 14 '18 at 22:39

## 1 Answer

The scale factors were causing weird problems, so replaced with with width specifications. Note: I used two different approaches w.r.t. positioning the "subfigures" for demonstration purposes.

I took rather extreme liberties trying to get the tabular to fit the page. I'm not happy with the default footnote marks (minipages), but am too tired to figure out how to change them right now.

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage[labelformat=simple]{subcaption}
\renewcommand\thesubfigure{(\alph{subfigure})}
\renewcommand\thesubtable{(\alph{subtable})}
\usepackage{array}% for \extrasrrowheight
\usepackage{siunitx}

\begin{document}

\noindent\begin{minipage}{\textwidth}
\centering
\begin{minipage}[b]{0.45\textwidth}
\includegraphics[width=\textwidth]{LwT2_3d_statespace1.png}
\captionof{subfigure}{}
\label{LwT1AssPhase}
\end{minipage}\hfil
\begin{minipage}[b]{0.45\textwidth}
\includegraphics[width=\textwidth]{LwT2_3d_statespace2.png}
\captionof{subfigure}{}
\label{LwT1DissPhase}
\end{minipage}

\begin{minipage}[b]{0.45\textwidth}
\includegraphics[width=\textwidth]{LwT2_3d_statespace3.png}
\captionof{subfigure}{}
\label{LwT1AssPhase}
\end{minipage}\hfill
\begin{minipage}[b]{0.45\textwidth}
\includegraphics[width=\textwidth]{LwT2_3d_statespace4.png}
\captionof{subfigure}{}
\label{LwT1DissPhase}
\end{minipage}

\captionof{figure}[Visualisations of a solution trajectory for the Langmuir two concentration model in the association phase]%
{Visualisations of a solution trajectory for the Langmuir two concentration model in the association phase (cyan) alongside nullcline-planes $x_1$ in blue, $x_2$ in red, $C$ in green}
\label{LwT2PhasePort}

\vspace{\floatsep}% standard interfloat separation
\captionof{table}{Values taken by parameters in Fig. \ref{LwT2PhasePort} and  \ref{LwT2dPhasePort}}%add key
\label{tab:LwTsols}
\small
\sisetup{exponent-product = \cdot}
\setlength{\extrarowheight}{1.5pt}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|}% 9*{c|}
\hline
Parameter  &$k_{a1}$ & $k_{a2}$ & $k_{d1}$ & $k_{d2}$ & $R$ & $C_T$ & $k_m$ & $h$ \\%\hline
& \si{M^{-1} s^{-1}} & \si{M^{-1}s^{-1}} & \si{s^{-1}} & \si{s^{-1}} & \footnote{\si{pg nm^{-2}}} & nM
& \footnote{\si{pgnm^{-2}M^{-1}s^{-1}}}
& \footnote{\si{pgnm^{-2}M^{-1}}} \\
\hline%\hline
Value & \num{6E-4} & \num{5E-4} & \num{7E-3} & \num{1E-2} & 500 & 100 & \num{E-4} & \num{E-6}  \\
\hline
\end{tabular}
\end{minipage}

\end{document}


• Thanks. I've just tried to compile this with my document and got this error snag.gy/KPtDjO.jpg - it looks like its caused by the siunitx sty file;. Any idea how to fix it? Sep 15 '18 at 9:12
• the version of siunitx is the generic one that miktex package manager downloaded, I can't seem to find any other version. Sep 15 '18 at 9:30
• As this seemed like a big question I moved it to its on question page so it would be more visible tex.stackexchange.com/questions/450971/… thanks for your help Sep 15 '18 at 9:45
• Sure, just use your original tabular. It was just that your table cried out "Use siunitx!" and I couldn't resist. Sep 15 '18 at 13:54
• If you want it on a separate page, just replace the outer minipage with a figure or table [p]. You can then lose the \noindent. Sep 15 '18 at 18:36