1

Exact image of what I want to achieve, done in Microsoft Word

I'd like to have a table next to a figure, but have them with both independent captions and with the figure caption taking over the whole bottom of the column, and the table caption on the top of the table. I achieved the image inserted above by using MS Word to illustrate exactly what I want. So far I haven't been able to figure it out. Here's the code to both my table and my image:

\begin{figure}[!t]
\centerline{\includegraphics[width=\columnwidth]{Figure 1.png}}
\caption{(a) Setup used for all of the in vivo experiments in this particular case, in the relaxed state and with the probe placed along the fibers. The same setup for the three external vibration sources was maintained in the experiments of the across the fibers set, with only the position of the probe changed to be perpendicular to the one shown here. (b) Flexed arm of the volunteer subject at the exact degree of elbow flexion as the one maintained during the MVC experiments of both sets.}
\label{fig1}
\end{figure}

\begin{table}[!t]
\centering
\caption{Experimental Setup \\ 200-300 Hz $f_v$}
\label{table_expsetups}
\begin{tabular}{c|c}
\hline
Along the fibers & Across the fibers \\
\hline
Relaxed E1 & Relaxed Ac. \\
MVC E1 & MVC Ac. \\
Relaxed E2 \\
MVC E2
\end{tabular}
\end{table}

And here's the closest I've gotten to achieving it, by using mini pages, although I can't get the image's caption to take up the whole column space:

%Figure and table in the same column
\begin{minipage}{0.8\columnwidth}
    \begin{minipage}[p]{0.48\columnwidth}
        \centering
        \includegraphics[width=\columnwidth]{Figure 1.png}
        \captionof{figure}{(a) Setup used for all of the in vivo experiments in this particular case, in the relaxed state and with the probe placed along the fibers. The same setup for the three external vibration sources was maintained in the experiments of the across the fibers set, with only the position of the probe changed to be perpendicular to the one shown here. (b) Flexed arm of the volunteer subject at the exact degree of elbow flexion as the one maintained during the MVC experiments of both sets}
    \end{minipage}
    \hfill
    \begin{minipage}[p]{0.48\columnwidth}
        \centering
        \captionof{table}{Experimental Setup \\ 200-300 Hz $f_v$}
        \resizebox{1.2\columnwidth}{!}{%
        \begin{tabular}[p]{c|c}
            \hline
            Along the fibers & Across the fibers \\
            \hline
            Relaxed E1 & Relaxed Ac. \\
            MVC E1 & MVC Ac. \\
            Relaxed E2 \\
            MVC E2
        \end{tabular}%
    }
    \end{minipage}
\end{minipage}

It's also worth noting that I'm working in a conference paper template that has two columns and I'm looking to not have a floating figure of the two items but rather something I can pin at the top or bottom of the page

Also, I'd love it if the numbering on the table and the figure could be independent of each other so that the subsequent tables and figures do not get affected by it. Thanks in advance.

2
  • Since you mention a twocolumn layout: Do you want image and table to be as wide as one of the text columns or as wide as both columns? How wide should the figure's caption be exactly? As wide as the text column(s) or narrower?
    – leandriis
    Aug 21, 2020 at 20:58
  • I'd like the table and the figure to be as wide as one of the columns and the figure's caption to be as wide as the regular text in the column. Thank you. Aug 21, 2020 at 21:00

1 Answer 1

3

Probably something like the following gives you an idea on how to start. since there was no documentclass given in your question, I had to guess one. Apart from repositioning the figure's caption, I also changed the table code in order to avoid using \resizebox as this command only results in inconsitent font sizes throughout the document. How exactly you can ensure that your table fits into the available space depends on the font and margin sized determined by your documentclass.

enter image description here

\documentclass[twocolumn]{article}
\usepackage{caption}

\usepackage[demo]{graphicx}
\usepackage[export]{adjustbox}
\usepackage{makecell}

\usepackage{lipsum}
\begin{document}

\noindent\begin{minipage}{\columnwidth}
    \begin{minipage}[t]{0.48\columnwidth}
        \centering
        \includegraphics[width=\linewidth,valign=t]{example-image}
    \end{minipage}
    \hfill
    \begin{minipage}[t]{0.48\columnwidth}
        \centering
        \footnotesize
        \captionof{table}{Experimental Setup 200-300 Hz $f_v$}
        \begin{tabular}[t]{c|c}
            \hline
            \thead{Along the\\ fibers} & \thead{Across the\\ fibers} \\
            \hline
            Relaxed E1 & Relaxed Ac. \\
            MVC E1 & MVC Ac. \\
            Relaxed E2 \\
            MVC E2
        \end{tabular}%
    \end{minipage}
            \captionof{figure}{(a) Setup used for all of the in vivo experiments in this particular case, in the relaxed state and with the probe placed along the fibers. The same setup for the three external vibration sources was maintained in the experiments of the across the fibers set, with only the position of the probe changed to be perpendicular to the one shown here. (b) Flexed arm of the volunteer subject at the exact degree of elbow flexion as the one maintained during the MVC experiments of both sets}
\end{minipage}
\lipsum
\end{document}

Using a figure environment instead of the outer minipage allows your image-table-combintation to be place at the top or the bottom of the page while allowing the text to flow around it:

enter image description here

\documentclass[conference]{IEEEtran}
\usepackage{caption}

\usepackage[demo]{graphicx}
\usepackage[export]{adjustbox}
\usepackage{makecell}

\usepackage{lipsum}
\begin{document}
\lipsum[2]
\begin{figure}[tb]
    \begin{minipage}[t]{0.48\columnwidth}
        \centering
        \includegraphics[width=\linewidth,valign=t]{example-image}
    \end{minipage}
    \hfill
    \begin{minipage}[t]{0.48\columnwidth}
        \centering
        \small
        \captionof{table}{Experimental Setup 200-300 Hz $f_v$}
        \begin{tabular}[t]{c|c}
            \hline
            \thead{Along the\\ fibers} & \thead{Across the\\ fibers} \\
            \hline
            Relaxed E1 & Relaxed Ac. \\
            MVC E1 & MVC Ac. \\
            Relaxed E2 \\
            MVC E2
        \end{tabular}%
    \end{minipage}
            \caption{(a) Setup used for all of the in vivo experiments in this particular case, in the relaxed state and with the probe placed along the fibers. The same setup for the three external vibration sources was maintained in the experiments of the across the fibers set, with only the position of the probe changed to be perpendicular to the one shown here. (b) Flexed arm of the volunteer subject at the exact degree of elbow flexion as the one maintained during the MVC experiments of both sets}
\end{figure}
\lipsum
\newpage

\lipsum[1]
\begin{figure}[b]
    \begin{minipage}[t]{0.48\columnwidth}
        \centering
        \includegraphics[width=\linewidth,valign=t]{example-image}
    \end{minipage}
    \hfill
    \begin{minipage}[t]{0.48\columnwidth}
        \centering
        \small
        \captionof{table}{Experimental Setup 200-300 Hz $f_v$}
        \begin{tabular}[t]{c|c}
            \hline
            \thead{Along the\\ fibers} & \thead{Across the\\ fibers} \\
            \hline
            Relaxed E1 & Relaxed Ac. \\
            MVC E1 & MVC Ac. \\
            Relaxed E2 \\
            MVC E2
        \end{tabular}%
    \end{minipage}
            \caption{(a) Setup used for all of the in vivo experiments in this particular case, in the relaxed state and with the probe placed along the fibers. The same setup for the three external vibration sources was maintained in the experiments of the across the fibers set, with only the position of the probe changed to be perpendicular to the one shown here. (b) Flexed arm of the volunteer subject at the exact degree of elbow flexion as the one maintained during the MVC experiments of both sets}
\end{figure}
\lipsum
\end{document}
2
  • Thank you so much! That worked wonders! I only have one question though, is there a way I can stop it from being wrapped around the text? I want it either pinned at the top of the bottom of my document. My document class is \documentclass[conference]{IEEEtran} btw Aug 21, 2020 at 21:18
  • @CESARESTEFANOMACHADOFERRER: I have updated my answer accordingly.
    – leandriis
    Aug 22, 2020 at 8:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .