1

I have this problem: I would like to box in the bottom of the table. At the moment it looks like this: enter image description here

\begin{table}[ht]
\centering
\begin{tabular}{|c|c|c|c|c|c|} \hline
$\sim$ Light intensity & Total &  Upwards & Downwards & True positive & False positive\\  \hline
    228 & 64  & 32 & 32 & 16  & 0 \\
    217 & 112 & 56 & 56 & 22 & 0 \\
    181 & 48  & 24 & 24 & 5  & 0  \\ 
    164 & 80  & 40 & 40 & 1  & 0  \\ 
    150 & 64  & 32 & 32 & 1  & 0  \\\hline
    Total & 368 & 184 & 184 & 45 & 0 \\\specialrule{.2em}{.1em}{.1em}  
    Found [\%] & 12.23\% &  True positive & 100\% & False positive & 0\%  \\ \specialrule{.2em}{.1em}{.1em}  

\end{tabular}
\caption{Testing of method 2BB with a performance of 100\%}
\label{tab:method6}
\end{table}

I would like it to look like this: enter image description here

I hope you guys can help me! Kind regards Emil

2

2 Answers 2

0

The following MWE contains an adaption of my previous answer. I have also included two other possibilities using the before mentioned booktabs package.

enter image description here

\documentclass{article}
\usepackage{geometry}
\usepackage{booktabs}

\usepackage{array}

\newlength{\defaultarrayrulewidth}
\newcommand{\Cline}[2]{%
  \noalign{\global\setlength{\defaultarrayrulewidth}{\arrayrulewidth}}%
  \noalign{\global\setlength{\arrayrulewidth}{#1}}\cline{#2}%
  \noalign{\global\setlength{\arrayrulewidth}{\defaultarrayrulewidth}}}


\begin{document}

\begin{table}[ht]
\centering
\begin{tabular}{|c|c|c|c|c|c|} \hline
$\sim$ Light intensity & Total &  Upwards & Downwards & True positive & False positive\\  \hline
    228 & 64  & 32 & 32 & 16  & 0 \\
    217 & 112 & 56 & 56 & 22 & 0 \\
    181 & 48  & 24 & 24 & 5  & 0  \\ 
    164 & 80  & 40 & 40 & 1  & 0  \\ 
    150 & 64  & 32 & 32 & 1  & 0  \\\hline
    Total & 368 & 184 & 184 & 45 & 0 \\ \Cline{2pt}{1-6}   
       \multicolumn{1}{! {\vline width 2pt}c|}{ Found [\%]} & \multicolumn{1}{c!{\vline width 1pt}}{12.23\,\%} & \multicolumn{1}{!{\vline width 1pt}c|}{True positive} & \multicolumn{1}{c!{\vline width 1pt}}{100\,\%} & \multicolumn{1}{!{\vline width 1pt}c|}{False positive }&\multicolumn{1}{c!{\vline width 2pt}}{ 0\,\%} \\ \Cline{2pt}{1-6}  

\end{tabular}
\caption{Testing of method 2BB with a performance of 100\%}
\label{tab:method6}
\end{table}

\begin{table}[ht]
\centering
\begin{tabular}{cccccc} \toprule
$\sim$ Light intensity & Total &  Upwards & Downwards & True positive & False positive\\  \hline
    228 & 64  & 32 & 32 & 16  & 0 \\
    217 & 112 & 56 & 56 & 22 & 0 \\
    181 & 48  & 24 & 24 & 5  & 0  \\ 
    164 & 80  & 40 & 40 & 1  & 0  \\ 
    150 & 64  & 32 & 32 & 1  & 0  \\ \midrule
    Total & 368 & 184 & 184 & 45 & 0 \\ \midrule   
    Found [\%] & 12.23\% &  True positive & 100\% & False positive & 0\%  \\  
\bottomrule
\end{tabular}
\caption{Testing of method 2BB with a performance of 100\%}
\label{tab:method6}
\end{table}


\begin{table}[ht]
\centering
\begin{tabular}{cccccc} \toprule
$\sim$ Light intensity & Total &  Upwards & Downwards & True positive & False positive\\  \hline
    228 & 64  & 32 & 32 & 16  & 0 \\
    217 & 112 & 56 & 56 & 22 & 0 \\
    181 & 48  & 24 & 24 & 5  & 0  \\ 
    164 & 80  & 40 & 40 & 1  & 0  \\ 
    150 & 64  & 32 & 32 & 1  & 0  \\ \midrule
    Total & 368 & 184 & 184 & 45 & 0 \\ \midrule   
    Found [\%] & 12.23\% &  &  & 100\% & 0\%  \\  
\bottomrule
\end{tabular}
\caption{Testing of method 2BB with a performance of 100\%}
\label{tab:method6}
\end{table}


\end{document}
1
  • Thank you guys! It helped me a lot! I ended up useing method 3. Thanks again
    – Emil
    Jun 26, 2019 at 19:12
1

A solution with the thick rules from package makecell (another possibility would be to use the boldline package):

\documentclass{article}
\usepackage{array, makecell, booktabs}
\setlength{\extrarowheight}{2pt}

\begin{document}

\begin{table}[ht]
\centering
\begin{tabular}{|*{6}{c|}}
 \hline
$\sim$ Light intensity & Total & Upwards & Downwards & True positive & False positive\\ \hline
    228 & 64 & 32 & 32 & 16 & 0 \\
    217 & 112 & 56 & 56 & 22 & 0 \\
    181 & 48 & 24 & 24 & 5 & 0 \\
    164 & 80 & 40 & 40 & 1 & 0 \\
    150 & 64 & 32 & 32 & 1 & 0 \\\hline
    Total & 368 & 184 & 184 & 45 & 0 \\
    \Xhline{.2em}
   \multicolumn{1}{! {\vline width .2em}c|}{ Found [\%]} & \multicolumn{1}{c!{\vline width .1em}}{12.23\,\%} & \multicolumn{1}{!{\vline width .1em}c|}{True positive} & \multicolumn{1}{c!{\vline width .1em}}{100\,\%} & \multicolumn{1}{!{\vline width .1em}c|}{False positive }&\multicolumn{1}{c!{\vline width .2em}}{ 0\,\%} \\
   \Xhline{.2em}
\end{tabular}
\caption{Testing of method 2BB with a performance of 100\%}
\label{tab:method6}
\end{table}

\end{document} 

enter image description here

You must log in to answer this question.

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