0

I cannot make my table fit into the page, how can I make it fit into it? Here is a screenshot of what my table looks like

![enter image description here

\documentclass[conference]{IEEEtran}
\IEEEoverridecommandlockouts
% The preceding line is only needed to identify funding in the first footnote. If that is unneeded, please comment it out.
\usepackage{cite}
\usepackage[table,xcdraw]{xcolor}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{algorithmic}
\usepackage{graphicx}
\usepackage{algorithm}
\usepackage{textcomp}
\usepackage{xcolor}
\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
    T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
\usepackage{booktabs, makecell, multirow, tabularx}

\newcommand\mytab[1]{\begin{tabular}[t]{@{}c@{}} #1 \end{tabular}}
\newcommand\mc[2]{\multicolumn{#1}{c}{#2}}
 \renewcommand{\algorithmiccomment}[1]{//#1}

 \renewcommand{\algorithmiccomment}[1]{//#1}
\usepackage{multirow, tabularx, ragged2e}
\newcolumntype{C}{>{\Centering\arraybackslash}X}









        \begin{table*}[]
\caption{Results for Different Types of Seeding with each one across 10 Iterations }
\label{tab:results}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
\multirow{2}{*}{\textbf{\begin{tabular}[c]{@{}c@{}}1-\\ Seed.\\ Type\end{tabular}}} & \multirow{2}{*}{\textbf{\begin{tabular}[c]{@{}c@{}}2-\\ Seed.\\ Type\end{tabular}}} & \multirow{2}{*}{\textbf{\begin{tabular}[c]{@{}c@{}}3-\\ Prog.\end{tabular}}} & \multicolumn{2}{c|}{\textbf{Validation}} & \multicolumn{2}{c|}{\textbf{Contradiction}} & \textbf{Fail} & \multicolumn{2}{c|}{\textbf{AutoCompletion}} & \multicolumn{3}{c|}{\textbf{Predictions}} & \multicolumn{2}{c|}{\textbf{Precision}} & \multicolumn{2}{c|}{\textbf{Recall}} \\ \cline{4-17} 
 &  &  & \textbf{\begin{tabular}[c]{@{}c@{}}4-\\ TP\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}5-\\ TN\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}6-\\ FP\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}7-\\ FN\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}8-\\ U\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}9-\\ U-\textgreater{}T\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}10-\\ U-\textgreater{}N\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}11-\\ Tp\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}12-\\ Np\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}13-\\ Up\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}14-\\ Tr.\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}15-\\ No\\ Tr.\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}16-\\ Tr\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}17-\\ No\\ Tr.\end{tabular}} \\ \hline
\multirow{12}{*}{\textbf{\begin{tabular}[c]{@{}c@{}}Incomp.\\ Seed.\end{tabular}}} & \multirow{6}{*}{\textbf{TtoE}} & \textbf{Chess} & 1692 & 14214 & 195 & 578 & 35961 & 942 & 7083 & 2829 & 21875 & 27936 & 90 & 96 & 75 & 99 \\ \cline{3-17} 
 &  & \textbf{Gantt} & 600 & 119066 & 104 & 404 & 681906 & 1046 & 128113 & 1750 & 247583 & 552747 & 85 & 100 & 60 & 100 \\ \cline{3-17} 
 &  & \textbf{iTrust} & 564 & 17300 & 34 & 70 & 1652452 & 5426 & 154822 & 6024 & 172192 & 1492204 & 94 & 100 & 89 & 100 \\ \cline{3-17} 
 &  & \textbf{JHot.} & 999 & 35682 & 224 & 302 & 1071193 & 3210 & 82812 & 4433 & 118796 & 985171 & 82 & 99 & 77 & 99 \\ \cline{3-17} 
 &  & \textbf{VOD} & 100 & 3427 & 24 & 134 & 20625 & 172 & 3312 & 296 & 6873 & 17141 & 81 & 96 & 43 & 99 \\ \cline{3-17} 
 &  & \textbf{Avg.} & \textbf{791} & \textbf{37938} & \textbf{116} & \textbf{298} & \textbf{692427} & \textbf{2159} & \textbf{75228} & \textbf{3066} & \textbf{113464} & \textbf{615040} & \textbf{86} & \textbf{98} & \textbf{69} & \textbf{99} \\ \cline{2-17} 
 & \multirow{6}{*}{\textbf{NtoE}} & \textbf{Chess} & 3644 & 8699 & 710 & 147 & 46960 & 2287 & 4341 & 6641 & 13187 & 40332 & 84 & 98 & 96 & 92 \\ \cline{3-17} 
 &  & \textbf{Gantt} & 1222 & 58617 & 416 & 169 & 741656 & 3042 & 62607 & 4680 & 121393 & 676007 & 75 & 100 & 88 & 99 \\ \cline{3-17} 
 &  & \textbf{iTrust} & 1090 & 9071 & 195 & 38 & 1660026 & 10672 & 74470 & 11957 & 83579 & 1574884 & 85 & 100 & 97 & 98 \\ \cline{3-17} 
 &  & \textbf{JHot.} & 1898 & 22750 & 649 & 101 & 1343802 & 7378 & 55141 & 9925 & 77992 & 1281283 & 75 & 100 & 95 & 97 \\ \cline{3-17} 
 &  & \textbf{VOD} & 206 & 2353 & 102 & 70 & 28209 & 301 & 2137 & 609 & 4560 & 25771 & 67 & 97 & 75 & 96 \\ \cline{3-17} 
 &  & \textbf{Avg.} & \textbf{1612} & \textbf{20298} & \textbf{414} & \textbf{105} & \textbf{764131} & \textbf{4736} & \textbf{39739} & \textbf{6762} & \textbf{60142} & \textbf{719655} & \textbf{77} & \textbf{99} & \textbf{90} & \textbf{97} \\ \hline
\multirow{12}{*}{\textbf{\begin{tabular}[c]{@{}c@{}}Error \\ Seed.\end{tabular}}} & \multirow{6}{*}{\textbf{TtoN}} & \textbf{Chess} & 1268 & 14507 & 206 & 1639 & 35020 & 755 & 7693 & 2229 & 23839 & 26572 & 86 & 90 & 44 & 99 \\ \cline{3-17} 
 &  & \textbf{Gantt} & 463 & 119182 & 108 & 830 & 681497 & 894 & 128952 & 1465 & 248964 & 551651 & 81 & 99 & 36 & 100 \\ \cline{3-17} 
 &  & \textbf{iTrust} & 471 & 17601 & 32 & 353 & 1651963 & 4345 & 157587 & 4848 & 175541 & 1490031 & 94 & 98 & 57 & 100 \\ \cline{3-17} 
 &  & \textbf{JHot.} & 779 & 35811 & 220 & 774 & 1070816 & 2691 & 84181 & 3690 & 120766 & 983944 & 78 & 98 & 50 & 99 \\ \cline{3-17} 
 &  & \textbf{VOD} & 80 & 3490 & 20 & 246 & 20474 & 128 & 3444 & 228 & 7180 & 16902 & 80 & 93 & 25 & 99 \\ \cline{3-17} 
 &  & \textbf{Avg.} & \textbf{612} & \textbf{38118} & \textbf{117} & \textbf{768} & \textbf{691954} & \textbf{1763} & \textbf{76371} & \textbf{2492} & \textbf{115258} & \textbf{613820} & \textbf{84} & \textbf{96} & \textbf{42} & \textbf{99} \\ \cline{2-17} 
 & \multirow{6}{*}{\textbf{NtoT}} & \textbf{Chess} & 3976 & 5077 & 8021 & 83 & 43003 & 5515 & 2351 & 17512 & 7511 & 35137 & 33 & 98 & 98 & 39 \\ \cline{3-17} 
 &  & \textbf{Gantt} & 1483 & 32547 & 56213 & 102 & 711735 & 59556 & 37253 & 117252 & 69902 & 614926 & 3 & 100 & 94 & 37 \\ \cline{3-17} 
 &  & \textbf{iTrust} & 1222 & 8406 & 14616 & 30 & 1646146 & 103464 & 48752 & 119302 & 57188 & 1493930 & 8 & 100 & 98 & 37 \\ \cline{3-17} 
 &  & \textbf{JHot.} & 2130 & 13188 & 29385 & 65 & 1324432 & 79238 & 27047 & 110753 & 40300 & 1218147 & 7 & 100 & 97 & 31 \\ \cline{3-17} 
 &  & \textbf{VOD} & 290 & 1681 & 1795 & 27 & 27147 & 1858 & 1715 & 3943 & 3423 & 23574 & 14 & 98 & 91 & 48 \\ \cline{3-17} 
 &  & \textbf{Avg.} & \textbf{1820} & \textbf{12180} & \textbf{22006} & \textbf{61} & \textbf{750493} & \textbf{49926} & \textbf{23424} & \textbf{73752} & \textbf{35665} & \textbf{677143} & \textbf{13} & \textbf{99} & \textbf{96} & \textbf{38} \\ \hline
\end{tabular}
\end{table*}

\end{document}
1
0

Two problems with your MWE: 1. you are missing \begin{document} 2. Since this is a two column document you should really be using \begin{table*}

Easiest way would be to use resizebox. You'd be scaling the table down so you need to make sure that A. The conference allow that command, and B. That the text is still readable:

\begin{table*}[]
\centering
\caption{Results for Different Types of Seeding with each one across 10 Iterations }
\label{tab:results}
\resizebox{\textwidth}{!}{
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
.
.
.
\end{tabular}}
\end{table*}

Another option is to Like in this question, rotating the table.

\usepackage[graphicx]{realboxes}
.
.
.
\begin{table*}[]
\centering
\caption{Results for Different Types of Seeding with each one across 10 Iterations }
\label{tab:results}
\Rotatebox{90}{
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
.
.
.
\end{tabular}}
\end{table*}
4
  • Resizing tables is not recommended, as it leads to inconsistent font sizes and sometimes unreadable tables.
    – Bernard
    Nov 13 '19 at 13:47
  • Yea, I know, I said that in the answer, and that is why I also added the rotation option
    – Elad Den
    Nov 13 '19 at 13:59
  • Why not manually decrease the font size and tabcolsep?
    – leandriis
    Nov 13 '19 at 14:17
  • Maybe you should also make your example codes compilable and also add Screenshots of the output.
    – leandriis
    Nov 13 '19 at 14:22
0

With this many columns and only a little overlap, you can make \tabcolsep (the space between columns) a little smaller. I used trial and error.

\documentclass[conference]{IEEEtran}
\IEEEoverridecommandlockouts
% The preceding line is only needed to identify funding in the first footnote. If that is unneeded, please comment it out.
\usepackage{cite}
\usepackage[table,xcdraw]{xcolor}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{algorithmic}
\usepackage{graphicx}
\usepackage{algorithm}
\usepackage{textcomp}
\usepackage{xcolor}
\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
    T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
\usepackage{booktabs, makecell, multirow, tabularx}

\usepackage{showframe}% MWE only

\newcommand\mytab[1]{\begin{tabular}[t]{@{}c@{}} #1 \end{tabular}}
\newcommand\mc[2]{\multicolumn{#1}{c}{#2}}
 \renewcommand{\algorithmiccomment}[1]{//#1}

 \renewcommand{\algorithmiccomment}[1]{//#1}
\usepackage{multirow, tabularx, ragged2e}
\newcolumntype{C}{>{\Centering\arraybackslash}X}

\begin{document}
        \begin{table*}[]
\caption{Results for Different Types of Seeding with each one across 10 Iterations }
\label{tab:results}
\tabcolsep=0.6em %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% new code %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\centering
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
\multirow{2}{*}{\textbf{\begin{tabular}[c]{@{}c@{}}1-\\ Seed.\\ Type\end{tabular}}} & \multirow{2}{*}{\textbf{\begin{tabular}[c]{@{}c@{}}2-\\ Seed.\\ Type\end{tabular}}} & \multirow{2}{*}{\textbf{\begin{tabular}[c]{@{}c@{}}3-\\ Prog.\end{tabular}}} & \multicolumn{2}{c|}{\textbf{Validation}} & \multicolumn{2}{c|}{\textbf{Contradiction}} & \textbf{Fail} & \multicolumn{2}{c|}{\textbf{AutoCompletion}} & \multicolumn{3}{c|}{\textbf{Predictions}} & \multicolumn{2}{c|}{\textbf{Precision}} & \multicolumn{2}{c|}{\textbf{Recall}} \\ \cline{4-17} 
 &  &  & \textbf{\begin{tabular}[c]{@{}c@{}}4-\\ TP\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}5-\\ TN\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}6-\\ FP\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}7-\\ FN\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}8-\\ U\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}9-\\ U-\textgreater{}T\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}10-\\ U-\textgreater{}N\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}11-\\ Tp\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}12-\\ Np\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}13-\\ Up\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}14-\\ Tr.\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}15-\\ No\\ Tr.\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}16-\\ Tr\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}17-\\ No\\ Tr.\end{tabular}} \\ \hline
\multirow{12}{*}{\textbf{\begin{tabular}[c]{@{}c@{}}Incomp.\\ Seed.\end{tabular}}} & \multirow{6}{*}{\textbf{TtoE}} & \textbf{Chess} & 1692 & 14214 & 195 & 578 & 35961 & 942 & 7083 & 2829 & 21875 & 27936 & 90 & 96 & 75 & 99 \\ \cline{3-17} 
 &  & \textbf{Gantt} & 600 & 119066 & 104 & 404 & 681906 & 1046 & 128113 & 1750 & 247583 & 552747 & 85 & 100 & 60 & 100 \\ \cline{3-17} 
 &  & \textbf{iTrust} & 564 & 17300 & 34 & 70 & 1652452 & 5426 & 154822 & 6024 & 172192 & 1492204 & 94 & 100 & 89 & 100 \\ \cline{3-17} 
 &  & \textbf{JHot.} & 999 & 35682 & 224 & 302 & 1071193 & 3210 & 82812 & 4433 & 118796 & 985171 & 82 & 99 & 77 & 99 \\ \cline{3-17} 
 &  & \textbf{VOD} & 100 & 3427 & 24 & 134 & 20625 & 172 & 3312 & 296 & 6873 & 17141 & 81 & 96 & 43 & 99 \\ \cline{3-17} 
 &  & \textbf{Avg.} & \textbf{791} & \textbf{37938} & \textbf{116} & \textbf{298} & \textbf{692427} & \textbf{2159} & \textbf{75228} & \textbf{3066} & \textbf{113464} & \textbf{615040} & \textbf{86} & \textbf{98} & \textbf{69} & \textbf{99} \\ \cline{2-17} 
 & \multirow{6}{*}{\textbf{NtoE}} & \textbf{Chess} & 3644 & 8699 & 710 & 147 & 46960 & 2287 & 4341 & 6641 & 13187 & 40332 & 84 & 98 & 96 & 92 \\ \cline{3-17} 
 &  & \textbf{Gantt} & 1222 & 58617 & 416 & 169 & 741656 & 3042 & 62607 & 4680 & 121393 & 676007 & 75 & 100 & 88 & 99 \\ \cline{3-17} 
 &  & \textbf{iTrust} & 1090 & 9071 & 195 & 38 & 1660026 & 10672 & 74470 & 11957 & 83579 & 1574884 & 85 & 100 & 97 & 98 \\ \cline{3-17} 
 &  & \textbf{JHot.} & 1898 & 22750 & 649 & 101 & 1343802 & 7378 & 55141 & 9925 & 77992 & 1281283 & 75 & 100 & 95 & 97 \\ \cline{3-17} 
 &  & \textbf{VOD} & 206 & 2353 & 102 & 70 & 28209 & 301 & 2137 & 609 & 4560 & 25771 & 67 & 97 & 75 & 96 \\ \cline{3-17} 
 &  & \textbf{Avg.} & \textbf{1612} & \textbf{20298} & \textbf{414} & \textbf{105} & \textbf{764131} & \textbf{4736} & \textbf{39739} & \textbf{6762} & \textbf{60142} & \textbf{719655} & \textbf{77} & \textbf{99} & \textbf{90} & \textbf{97} \\ \hline
\multirow{12}{*}{\textbf{\begin{tabular}[c]{@{}c@{}}Error \\ Seed.\end{tabular}}} & \multirow{6}{*}{\textbf{TtoN}} & \textbf{Chess} & 1268 & 14507 & 206 & 1639 & 35020 & 755 & 7693 & 2229 & 23839 & 26572 & 86 & 90 & 44 & 99 \\ \cline{3-17} 
 &  & \textbf{Gantt} & 463 & 119182 & 108 & 830 & 681497 & 894 & 128952 & 1465 & 248964 & 551651 & 81 & 99 & 36 & 100 \\ \cline{3-17} 
 &  & \textbf{iTrust} & 471 & 17601 & 32 & 353 & 1651963 & 4345 & 157587 & 4848 & 175541 & 1490031 & 94 & 98 & 57 & 100 \\ \cline{3-17} 
 &  & \textbf{JHot.} & 779 & 35811 & 220 & 774 & 1070816 & 2691 & 84181 & 3690 & 120766 & 983944 & 78 & 98 & 50 & 99 \\ \cline{3-17} 
 &  & \textbf{VOD} & 80 & 3490 & 20 & 246 & 20474 & 128 & 3444 & 228 & 7180 & 16902 & 80 & 93 & 25 & 99 \\ \cline{3-17} 
 &  & \textbf{Avg.} & \textbf{612} & \textbf{38118} & \textbf{117} & \textbf{768} & \textbf{691954} & \textbf{1763} & \textbf{76371} & \textbf{2492} & \textbf{115258} & \textbf{613820} & \textbf{84} & \textbf{96} & \textbf{42} & \textbf{99} \\ \cline{2-17} 
 & \multirow{6}{*}{\textbf{NtoT}} & \textbf{Chess} & 3976 & 5077 & 8021 & 83 & 43003 & 5515 & 2351 & 17512 & 7511 & 35137 & 33 & 98 & 98 & 39 \\ \cline{3-17} 
 &  & \textbf{Gantt} & 1483 & 32547 & 56213 & 102 & 711735 & 59556 & 37253 & 117252 & 69902 & 614926 & 3 & 100 & 94 & 37 \\ \cline{3-17} 
 &  & \textbf{iTrust} & 1222 & 8406 & 14616 & 30 & 1646146 & 103464 & 48752 & 119302 & 57188 & 1493930 & 8 & 100 & 98 & 37 \\ \cline{3-17} 
 &  & \textbf{JHot.} & 2130 & 13188 & 29385 & 65 & 1324432 & 79238 & 27047 & 110753 & 40300 & 1218147 & 7 & 100 & 97 & 31 \\ \cline{3-17} 
 &  & \textbf{VOD} & 290 & 1681 & 1795 & 27 & 27147 & 1858 & 1715 & 3943 & 3423 & 23574 & 14 & 98 & 91 & 48 \\ \cline{3-17} 
 &  & \textbf{Avg.} & \textbf{1820} & \textbf{12180} & \textbf{22006} & \textbf{61} & \textbf{750493} & \textbf{49926} & \textbf{23424} & \textbf{73752} & \textbf{35665} & \textbf{677143} & \textbf{13} & \textbf{99} & \textbf{96} & \textbf{38} \\ \hline
\end{tabular}
\end{table*}

\end{document}

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