1

I am trying to get this table on the left of my page with the graph which is below on the right. They both have their own captions. I've heard of \minipage and \floatrow but I am not sure of the best way to go about it.

\documentclass[a4paper,10pt]{article}
\usepackage{tabularx} % extra features for tabular environment
\usepackage{amsmath}  % improve math presentation
\usepackage{graphicx} % takes care of graphic including machinery
\usepackage[margin=0.75in,a4paper]{geometry} % decreases margins
\usepackage{cite} % takes care of citations
\usepackage[final]{hyperref} % adds hyper links inside the generated pdf file
\usepackage{floatrow}
\hypersetup{
    colorlinks=true,       % false: boxed links; true: colored links
    linkcolor=blue,        % color of internal links
    citecolor=blue,        % color of links to bibliography
    filecolor=magenta,     % color of file links
    urlcolor=blue         
}
%++++++++++++++++++++++++++++++++++++++++


\begin{document}
    \begin{figure}
        \centering
        \label{fig:graphmeasurements} 
        \includegraphics[width=0.7\columnwidth]{graphmeasurements}
        \caption{
                 % spaces are big no-no withing labels
                % things like fig: are optional in the label but it helps
                % to orient yourself when you have multiple figures,
                % equations and tables
                Graph of all measurements taken during the experiment.
        }
\end{figure}

\begin{table}
\begin{center}
\caption{Current readings for first dip.}
\label{tbl:dip1} % spaces are big no-no withing labels
\begin{tabular}{| c | c |} 
\hline
\multicolumn{1}{|c|}{Potential (V)} & \multicolumn{1}{c|}{Current (nA)} \\
\hline
8.25 &   0.5000\\
8.55 &   0.4950\\
8.77 &   0.4900\\
9.02 &   0.4900\\
9.25 &   0.5100\\
9.50 &   0.5200\\
9.75 &   0.5800\\
9.99 &   0.6000\\
\hline
\end{tabular}
\end{center}
\end{table}

\begin{figure}
        \centering
        \label{fig:dip1} 
        \includegraphics[width=0.4\columnwidth]{dip1}
        \caption{
                 % spaces are big no-no withing labels
                % things like fig: are optional in the label but it helps
                % to orient yourself when you have multiple figures,
                % equations and tables
                Graph of all measurements taken during the experiment.
        }
\end{figure}

\begin{table}
\begin{center}
\caption{Current readings for second dip.}
\label{tbl:dip1} % spaces are big no-no withing labels
\begin{tabular}{| c | c |} 
\hline
\multicolumn{1}{|c|}{Potential (V)} & \multicolumn{1}{c|}{Current (nA)} \\
\hline
13.00 &   1.1300\\
13.24 &   1.1000\\
13.48 &   1.0000\\
13.75 &   0.8500\\
14.01 &   0.9000\\
14.25 &   1.0500\\
14.51 &   1.0750\\
14.74 &   1.1500\\
\hline
\end{tabular}
\end{center}
\end{table}

\begin{figure}
        \centering
        \label{fig:dip2} 
        \includegraphics[width=0.4\columnwidth]{dip2}
        \caption{
                 % spaces are big no-no withing labels
                % things like fig: are optional in the label but it helps
                % to orient yourself when you have multiple figures,
                % equations and tables
                Graph of all measurements taken during the experiment.
        }
\end{figure}

\begin{table}
\begin{center}
\caption{Current readings for third dip.}
\label{tbl:dip1} % spaces are big no-no withing labels
\begin{tabular}{| c | c |} 
\hline
\multicolumn{1}{|c|}{Potential (V)} & \multicolumn{1}{c|}{Current (nA)} \\
\hline
18.50 &   2.1000\\
18.75 &   2.0000\\
19.00 &   1.9000\\
19.26 &   1.8000\\
19.50 &   1.8000\\
19.75 &   1.9000\\
19.99 &   2.0000\\
20.27 &   2.1000\\
20.48 &   2.2500\\
20.75 &   2.5000\\
\hline
\end{tabular}
\end{center}
\end{table}

\begin{figure}
        \centering
        \label{fig:dip3} 
        \includegraphics[width=0.4\columnwidth]{dip3}
        \caption{
                 % spaces are big no-no withing labels
                % things like fig: are optional in the label but it helps
                % to orient yourself when you have multiple figures,
                % equations and tables
                Graph of all measurements taken during the experiment.
        }
\end{figure}

\begin{table}
\begin{center}
\caption{Current readings for fourth dip.}
\label{tbl:dip1} % spaces are big no-no withing labels
\begin{tabular}{| c | c |} 
\hline
\multicolumn{1}{|c|}{Potential (V)} & \multicolumn{1}{c|}{Current (nA)} \\
\hline
23.52 &   3.2000\\
23.84 &   2.9500\\
24.07 &   2.7500\\
24.29 &   2.7000\\
24.51 &   2.6500\\
24.76 &   2.7000\\
24.99 &   2.7000\\
25.26 &   3.0000\\
25.50 &   3.1000\\
25.76 &   3.3500\\
\hline
\end{tabular}
\end{center}
\end{table}

\begin{figure}
        \centering
        \label{fig:dip4} 
        \includegraphics[width=0.4\columnwidth]{dip4}
        \caption{
                 % spaces are big no-no withing labels
                % things like fig: are optional in the label but it helps
                % to orient yourself when you have multiple figures,
                % equations and tables
                Graph of all measurements taken during the experiment.
        }
\end{figure}
\end{document}
0

According to your question title I gues that you look for something like this:

enter image description here

(red lines indicate text area borders)

Do I'm right?

Edit: I reduce your document to MWE (Minimal Working Example) in which I consider from its preamble only packages which are relevant to your problem and only one example of a combination table/image. By it is produced above image.

As you can see, table andpPicture are in the same float table for picture caption is used captionof{figure}{<caption text>} which is numbered as figure. Picture is vertically centered by use option valign=c determined in the package adjustbox.

\documentclass[a4paper,10pt]{article}
\usepackage[margin=0.75in]{geometry} % decreases margins
\usepackage{tabularx} % extra features for tabular environment
\usepackage{caption}  % new
\usepackage[export]{adjustbox}% it also load "graphicx"
                              % needed for "valign=c" option

%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\begin{document}
\documentclass[a4paper,10pt]{article}
\usepackage[margin=0.75in]{geometry} % decreases margins
\usepackage{tabularx} % extra features for tabular environment
\usepackage{caption}  % new
\usepackage[export]{adjustbox}%  it also load "graphicx"

%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\begin{document}

\begin{table}[ht]
\centering
    \begin{tabularx}{\linewidth}{*{2}{>{\centering\arraybackslash}X}}
\begin{tabular}{| c | c |}
\hline
Potential (V)   &   Current (nA)    \\
\hline
8.25 &   0.5000\\
8.55 &   0.4950\\
8.77 &   0.4900\\
9.02 &   0.4900\\
9.25 &   0.5100\\
9.50 &   0.5200\\
9.75 &   0.5800\\
9.99 &   0.6000\\
\hline
\end{tabular}
    &   \includegraphics[width=\linewidth,valign=c]{example-image-duck} \\
%
\caption{Current readings for first dip.}
\label{tbl:dip1}
    &   \captionof{figure}{Graph of the first current trough.}
        \label{fig:dip1}
\end{tabularx}
    \end{table}
\end{document}
  • @Schrödinger'scat, more extended comment ... ok, i will ad some code :-) – Zarko Oct 8 at 3:14
  • Yes that is exactly what I am after!! How did you do this? – Lachlan Southam Oct 8 at 3:14
  • I just add some code, however, for it completion you need first to extend your code sniped to small complete document (we need to see relevant part of your document). – Zarko Oct 8 at 3:20
  • Is that code better for you? – Lachlan Southam Oct 8 at 3:50
  • @LachlanSoutham, not only for me but for all members of site :-). See edited answer. Now it contain complete MWE. – Zarko Oct 8 at 4:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.