[Tex/LaTex] How to make a big matrix look good

matrices

I have to put big matrices into my thesis and I cannot find a way to do it in a beautiful way. The problem is: these matrices are really sparse but I need them complete for analysis purposes.

So far, I have managed to represent them like this (leaving blank spaces where the value is 0):
My ugly matrix

The thing is, the matrix is 14×14, but I need the first row/column to show the number 1->14.

Any idea how to improve it while keeping the completeness?

EDIT : Here is the MWE:

\documentclass[11pt,a4paper]{article}
\usepackage{array}
\begin{document}
\begin{table}[!h]
\centering
\begin{tabular}{|c>{\centering\arraybackslash}p{0.5cm}|>{\centering\arraybackslash}p{0.5cm}|>{\centering\arraybackslash}p{0.5cm}|>{\centering\arraybackslash}p{0.5cm}|>{\centering\arraybackslash}p{0.5cm}|>{\centering\arraybackslash}p{0.5cm}|>{\centering\arraybackslash}p{0.5cm}|>{\centering\arraybackslash}p{0.5cm}|>{\centering\arraybackslash}p{0.5cm}|>{\centering\arraybackslash}p{0.7cm}|>{\centering\arraybackslash}p{0.5cm}|>{\centering\arraybackslash}p{0.5cm}|>{\centering\arraybackslash}p{0.5cm}|>{\centering\arraybackslash}p{0.85cm}|}
\hline
{\bfseries SVM} & \multicolumn{1}{|c|}{1} & \multicolumn{1}{c|}{2} & \multicolumn{1}{c|}{3} & \multicolumn{1}{c|}{4} & \multicolumn{1}{c|}{5} & \multicolumn{1}{c|}{6} & \multicolumn{1}{c|}{7} & \multicolumn{1}{c|}{8} & \multicolumn{1}{c|}{9} & \multicolumn{1}{c|}{10} & \multicolumn{1}{c|}{11} & \multicolumn{1}{c|}{12} & \multicolumn{1}{c|}{13} & \multicolumn{1}{c|}{14} \\
\hline
\multicolumn{1}{|c|}{1} &   &   &   &   &   &   &   &   &   &   &   &   &   & 2.3 \\
\hline \multicolumn{1}{|c|}{2} &   &   &   &   &   &   &   &   &   &   &   &   &   & 0.4 \\  
\hline \multicolumn{1}{|c|}{3} & & & & & & & & & & & & & & \\  
\hline \multicolumn{1}{|c|}{4} & & & & & & & & & & & & & & 0.2 \\
\hline  \multicolumn{1}{|c|}{5} && & & & & & & & 0.7 & & & & & 1.2 \\                   
\hline \multicolumn{1}{|c|}{6} & & & & & & & & & & & & & & 0.3 \\  
\hline \multicolumn{1}{|c|}{7} & & & & & & & & & & & & & & 0.2 \\         
\hline \multicolumn{1}{|c|}{8} & & & & & & & & & & & & & & 0.1 \\  
\hline \multicolumn{1}{|c|}{9} & & & & & & & & & 3.4 & & & & & 1.5 \\  
\hline \multicolumn{1}{|c|}{10} & & & & & & & & & & 11.0 & & & & \\      
\hline  \multicolumn{1}{|c|}{11} & & & & & & & & & & & & & & 0.1 \\      
\hline \multicolumn{1}{|c|}{12} & & & & & & & & & & & & & & 2.6 \\  
\hline \multicolumn{1}{|c|}{13} & & & & & & & & & & & & & & 0.1 \\  
\hline \multicolumn{1}{|c|}{14} & & & & & & & & & 0.2 & 0.3 & & & & 200.0 \\ 
\hline
\end{tabular}
\caption{Mean confusion matrices for the first multi-class classification.}
\label{table6}
\end{table}
\end{document}

Best Answer

A couple of possibilities:

enter image description here

\documentclass[11pt,a4paper]{article}
\usepackage{dcolumn}
\newcolumntype{d}{D..{3.1}}
\begin{document}


\noindent X\dotfill X

\bigskip
\begin{table}[htp]% not ever [!h]
\centering

\setlength\tabcolsep{.37pt}
\small
\begin{tabular}{@{}|D..{2.0}|*{14}{d|}@{}}
\hline
\multicolumn{1}{|c|}{\footnotesize\bfseries SVM} &
 \multicolumn{1}{c|}{1}
 & \multicolumn{1}{c|}{2}
 & \multicolumn{1}{c|}{3}
 & \multicolumn{1}{c|}{4}
 & \multicolumn{1}{c|}{5}
 & \multicolumn{1}{c|}{6}
 & \multicolumn{1}{c|}{7}
 & \multicolumn{1}{c|}{8}
 & \multicolumn{1}{c|}{9}
 & \multicolumn{1}{c|}{10}
 & \multicolumn{1}{c|}{11}
 & \multicolumn{1}{c|}{12}
 & \multicolumn{1}{c|}{13}
 & \multicolumn{1}{c|}{14}
 \\
\hline
1 &   &   &   &   &   &   &   &   &   &   &   &   &   & 2.3 \\
\hline 2 &   &   &   &   &   &   &   &   &   &   &   &   &   & 0.4 \\  
\hline 3 & & & & & & & & & & & & & & \\  
\hline 4 & & & & & & & & & & & & & & 0.2 \\
\hline  5 && & & & & & & & 0.7 & & & & & 1.2 \\                   
\hline 6 & & & & & & & & & & & & & & 0.3 \\  
\hline 7 & & & & & & & & & & & & & & 0.2 \\         
\hline 8 & & & & & & & & & & & & & & 0.1 \\  
\hline 9 & & & & & & & & & 3.4 & & & & & 1.5 \\  
\hline 10 & & & & & & & & & & 11.0 & & & & \\      
\hline  11 & & & & & & & & & & & & & & 0.1 \\      
\hline 12 & & & & & & & & & & & & & & 2.6 \\  
\hline 13 & & & & & & & & & & & & & & 0.1 \\  
\hline 14 & & & & & & & & & 0.2 & 0.3 & & & & 200.0 \\ 
\hline
\end{tabular}
\caption{Mean confusion matrices for the first multi-class classification.}
\label{table6}
\end{table}

\begin{table}[htp]% not ever [!h]
\centering

\setlength\tabcolsep{.58pt}
\small
\def\z{\multicolumn{1}{D.\cdot{2.2}}{.}}

\begin{tabular}{@{}D..{2.0}|*{14}{d}@{}}

\multicolumn{1}{c|}{\footnotesize\bfseries SVM} &
 \multicolumn{1}{c}{1}
 & \multicolumn{1}{c}{2}
 & \multicolumn{1}{c}{3}
 & \multicolumn{1}{c}{4}
 & \multicolumn{1}{c}{5}
 & \multicolumn{1}{c}{6}
 & \multicolumn{1}{c}{7}
 & \multicolumn{1}{c}{8}
 & \multicolumn{1}{c}{9}
 & \multicolumn{1}{c}{10}
 & \multicolumn{1}{c}{11}
 & \multicolumn{1}{c}{12}
 & \multicolumn{1}{c}{13}
 & \multicolumn{1}{c}{14}
 \\
\hline
1 &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z & 2.3 \\
 2 &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z & 0.4 \\  
 3 &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z & \\  
 4 &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z & 0.2 \\
  5 &\z &\z &\z &\z &\z &\z &\z &\z & 0.7 &\z &\z &\z &\z & 1.2 \\                   
 6 &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z & 0.3 \\  
 7 &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z & 0.2 \\         
 8 &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z & 0.1 \\  
 9 &\z &\z &\z &\z &\z &\z &\z &\z & 3.4 &\z &\z &\z &\z & 1.5 \\  
 10 &\z &\z &\z &\z &\z &\z &\z &\z &\z & 11.0 &\z &\z &\z & \\      
  11 &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z & 0.1 \\      
 12 &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z & 2.6 \\  
 13 &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z &\z & 0.1 \\  
 14 &\z &\z &\z &\z &\z &\z &\z &\z & 0.2 & 0.3 &\z &\z &\z & 200.0 \\ 

\end{tabular}
\caption{Mean confusion matrices for the first multi-class classification.}
\label{tablezz}
\end{table}

\end{document}
Related Question