I am using IEEE template for my paper writing. Now i want to insert a table which is 11×12. So it needs to stretch to the two columns format in the IEEE format. I did like this:
\documentclass[conference]{IEEEtran}
\setlength{\extrarowheight}{1pt}
\begin{table}
\caption{CIFAR-10 Confusion Matrix}
\label{my-label}
\begin{tabular}{|*{12}{p{1.11cm}|}}
\hline
labels & airplane & automobile & bird & cat & deer & dog & frog & horse & ship & truck & accuracy \\ \hline
airplane & 915 & 4 & 17 & 19 & 3 & 1 & 0 & 2 & 27 & 12 & 91.50\% \\ \hline
automobile & 8 & 934 & 3 & 4 & 0 & 0 & 3 & 0 & 10 & 38 & 93.40\% \\ \hline
bird & 60 & 1 & 813 & 37 & 19 & 23 & 30 & 10 & 7 & 0 & 81.30\% \\ \hline
cat & 18 & 1 & 34 & 746 & 25 & 113 & 37 & 18 & 8 & 0 & 74.60\% \\ \hline
deer & 24 & 1 & 38 & 33 & 809 & 19 & 44 & 29 & 2 & 1 & 80.90\% \\ \hline
dog & 4 & 0 & 37 & 106 & 23 & 792 & 9 & 26 & 2 & 1 & 79.20\% \\ \hline
frog & 2 & 5 & 19 & 35 & 1 & 20 & 912 & 2 & 3 & 1 & 91.20\% \\ \hline
horse & 14 & 0 & 26 & 20 & 18 & 28 & 4 & 886 & 3 & 1 & 88.60\% \\ \hline
ship & 35 & 10 & 3 & 2 & 0 & 2 & 1 & 0 & 936 & 11 & 93.60\% \\ \hline
truck & 23 & 37 & 4 & 10 & 1 & 2 & 2 & 0 & 15 & 906 & 90.60\% \\ \hline
\end{tabular}
\end{table}
The problem is that the caption is not centering between the two columns. How to do that??
How to center the table automatically between the two columns of IEEE format??
Best Answer
You need to use a
table*
environment instead of atable
environment, to allow the float to take up the space of both columns.In addition, you need to do something to reduce the width of the table. I suggest you use a
tabularx
environment instead of thetabular
environment and that you use a centered version of theX
column type for columns 2 thru 11. Use anl
column type for the first column and ac
column type for the final column. (If you really want to left-align all cell contents, use theX
column type for columns 2 thru 11.)Oh, and to try to give your table a more "open" look, say, by getting rid of all vertical lines and most horizontal lines and by generating well-spaced horizontal rules with the help of the
booktabs
package.