# Enhancing a table

I am writing to get your suggestion about how I could enhance a table. Please do not suggest changing color or fonts.

Code:

\begin{table}
\caption{Temporal Outliers that are detected with respect to the MetoSwiss Observations in $2007-09-30$}
\label{tod30f}
\centering
\footnotesize\setlength{\tabcolsep}{2.5pt}
\begin{tabular}{|c|c|c|c|c|c|}
\hline
Time - Node ID & 25 & 28 & 29 & 31 & 32 \\ \hline
0:00 & Normal & Normal & Normal & Normal & Normal \\ \hline
1:00 & Normal & Normal & Normal & Normal & Normal \\ \hline
2:00 & Normal & Normal & Normal & Normal & Normal \\ \hline
3:00 & Normal & Normal & Normal & Normal & Normal \\ \hline
4:00 & Normal & Normal & Normal & Normal & Normal \\ \hline
5:00 & Normal & Normal & Normal & Normal & Normal \\ \hline
6:00 & Normal & Normal & Normal & Normal & Normal \\ \hline
7:00 & Normal & Normal & Normal & Normal & Normal \\ \hline
8:00 & Normal & Normal & Normal & Normal & Normal \\ \hline
9:00 & Normal & Normal & Normal & Normal & Normal \\ \hline
10:00 & Normal & Normal & Normal & Normal & Normal \\ \hline
11:00 & Outlier & Normal & Outlier & Normal & Normal \\ \hline
12:00 & Outlier & Outlier & Outlier & Outlier & Outlier \\ \hline
13:00 & Outlier & Normal & Normal & Normal & Outlier \\ \hline
14:00 & Outlier & Normal & Normal & Outlier & Outlier \\ \hline
15:00 & Outlier & Outlier & Normal & Outlier & Normal \\ \hline
16:00 & Normal & Outlier & Normal & Normal & Normal \\ \hline
17:00 & Normal & Outlier & Outlier & Outlier & Normal \\ \hline
18:00 & Outlier & Normal & Outlier & Outlier & Normal \\ \hline
19:00 & Outlier & Outlier & Outlier & Outlier & Outlier \\ \hline
20:00 & Outlier & Outlier & Outlier & Outlier & Outlier \\ \hline
21:00 & Normal & Normal & Normal & Normal & Normal \\ \hline
22:00 & Normal & Normal & Normal & Outlier & Normal \\ \hline
\end{tabular}
\end{table}


Result of the code:

-
texdoc booktabs –  Yiannis Lazarides Jan 10 '13 at 2:27
I would just remove the Normal text and leave only the outliers then change the outlier text to something like a $\circ$ etc. –  percusse Jan 10 '13 at 2:38

The booktabs is a great resource for tables.

In particular, it provides the commands \toprule, \midrule, and \bottomrule. It also recommends not to use vertical lines in tabulars.

Here's a version of your table

\documentclass{article}
\usepackage{booktabs}

\begin{document}

\begin{table}
\caption{Temporal Outliers that are detected with respect to the MetoSwiss Observations in $2007-09-30$}
\label{tod30f}
\centering
\footnotesize\setlength{\tabcolsep}{2.5pt}
\begin{tabular}{cccccc}
\hline
Time - Node ID & 25      & 28      & 29      & 31      & 32      \\ \toprule
0:00           & Normal  & Normal  & Normal  & Normal  & Normal  \\ \midrule
1:00           & Normal  & Normal  & Normal  & Normal  & Normal  \\
2:00           & Normal  & Normal  & Normal  & Normal  & Normal  \\
3:00           & Normal  & Normal  & Normal  & Normal  & Normal  \\
4:00           & Normal  & Normal  & Normal  & Normal  & Normal  \\
5:00           & Normal  & Normal  & Normal  & Normal  & Normal  \\
6:00           & Normal  & Normal  & Normal  & Normal  & Normal  \\
7:00           & Normal  & Normal  & Normal  & Normal  & Normal  \\
8:00           & Normal  & Normal  & Normal  & Normal  & Normal  \\
9:00           & Normal  & Normal  & Normal  & Normal  & Normal  \\
10:00          & Normal  & Normal  & Normal  & Normal  & Normal  \\
11:00          & Outlier & Normal  & Outlier & Normal  & Normal  \\
12:00          & Outlier & Outlier & Outlier & Outlier & Outlier \\
13:00          & Outlier & Normal  & Normal  & Normal  & Outlier \\
14:00          & Outlier & Normal  & Normal  & Outlier & Outlier \\
15:00          & Outlier & Outlier & Normal  & Outlier & Normal  \\
16:00          & Normal  & Outlier & Normal  & Normal  & Normal  \\
17:00          & Normal  & Outlier & Outlier & Outlier & Normal  \\
18:00          & Outlier & Normal  & Outlier & Outlier & Normal  \\
19:00          & Outlier & Outlier & Outlier & Outlier & Outlier \\
20:00          & Outlier & Outlier & Outlier & Outlier & Outlier \\
21:00          & Normal  & Normal  & Normal  & Normal  & Normal  \\
22:00          & Normal  & Normal  & Normal  & Outlier & Normal  \\ \bottomrule
\end{tabular}
\end{table}

\end{document}


You can further improve it by loading the caption package with format=hang, and using

    \begin{tabular}{r@{:}l*{5}c}


to help with the alignment of the 'time' column. I have also put the 'Node ID' over the numbers using \multicolumn and \cmidrule.

\documentclass{article}
\usepackage{booktabs}
\usepackage[format=hang]{caption}
\begin{document}

\begin{table}
\caption{Temporal Outliers that are detected with respect to the MetoSwiss Observations in $2007-09-30$}
\label{tod30f}
\centering
\footnotesize\setlength{\tabcolsep}{2.5pt}
\begin{tabular}{r@{:}l*{5}c}
\toprule
\multicolumn{1}{c}{}&              & \multicolumn{5}{c}{Node ID}\\ \cmidrule{3-7}
\multicolumn{2}{c}{Time} & 25      & 28      & 29      & 31      & 32      \\ \toprule
0&00           & Normal  & Normal  & Normal  & Normal  & Normal  \\ \midrule
1&00           & Normal  & Normal  & Normal  & Normal  & Normal  \\
2&00           & Normal  & Normal  & Normal  & Normal  & Normal  \\
3&00           & Normal  & Normal  & Normal  & Normal  & Normal  \\
4&00           & Normal  & Normal  & Normal  & Normal  & Normal  \\
5&00           & Normal  & Normal  & Normal  & Normal  & Normal  \\
6&00           & Normal  & Normal  & Normal  & Normal  & Normal  \\
7&00           & Normal  & Normal  & Normal  & Normal  & Normal  \\
8&00           & Normal  & Normal  & Normal  & Normal  & Normal  \\
9&00           & Normal  & Normal  & Normal  & Normal  & Normal  \\
10&00          & Normal  & Normal  & Normal  & Normal  & Normal  \\
11&00          & Outlier & Normal  & Outlier & Normal  & Normal  \\
12&00          & Outlier & Outlier & Outlier & Outlier & Outlier \\
13&00          & Outlier & Normal  & Normal  & Normal  & Outlier \\
14&00          & Outlier & Normal  & Normal  & Outlier & Outlier \\
15&00          & Outlier & Outlier & Normal  & Outlier & Normal  \\
16&00          & Normal  & Outlier & Normal  & Normal  & Normal  \\
17&00          & Normal  & Outlier & Outlier & Outlier & Normal  \\
18&00          & Outlier & Normal  & Outlier & Outlier & Normal  \\
19&00          & Outlier & Outlier & Outlier & Outlier & Outlier \\
20&00          & Outlier & Outlier & Outlier & Outlier & Outlier \\
21&00          & Normal  & Normal  & Normal  & Normal  & Normal  \\
22&00          & Normal  & Normal  & Normal  & Outlier & Normal  \\ \bottomrule
\end{tabular}
\end{table}

\end{document}

-
Ah look at the indentation... ;) –  percusse Jan 10 '13 at 2:32
@percusse yep, indent.plx worked well on this one :) –  cmhughes Jan 10 '13 at 2:38
Is there anyway to simple convert of my other tables to booklet format? –  Topdombili Jan 10 '13 at 2:39
@cmhughes, How can I move the "Node Id " to the top of 25,28,29,31 and 32 as header. Subsequently put the time on first column header. –  Topdombili Jan 10 '13 at 2:44
@Topdombili see the update :) converting your other tables will be either have to be done tediously by hand, or else using a text processing script, such as perl; it shouldn't be too much work to search and replace for \hline –  cmhughes Jan 10 '13 at 2:54

Booktabs, can help with the typesetting. Rethinking the way you present the data is also important. First thing I did when I looked at the data was to see where was the data; it was lost in a sea of "Normal"; I am not sure what your "normal" is, or what an "outlier" is, but here is an alternative presentation.

-
very nice. Removing the clutter of date can improve presentation more than any amount of formatting. –  devendra Jan 10 '13 at 4:18
@devendra so true... –  Yiannis Lazarides Jan 10 '13 at 4:53