我写信是为了征求您对如何改进表格的建议。请不要建议更改颜色或字体。
代码:
\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}
代码结果:
答案1
这booktabs
是 的 巨大 资源tables
。
具体来说,它提供了命令\toprule
、\midrule
和\bottomrule
。它还建议不是使用垂直线tabulars
。
这是你的表格的一个版本
\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}
您可以通过加载caption
包装format=hang
,并使用
\begin{tabular}{r@{:}l*{5}c}
以帮助对齐“时间”列。我还使用\multicolumn
和将“节点 ID”放在数字上\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}
答案2
Booktabs
,可以帮助排版。重新考虑数据呈现方式也很重要。当我查看数据时,我做的第一件事就是查看数据在哪里;它迷失在“正常”的海洋中;我不确定你的“正常”是什么,或者“异常值”是什么,但这里有另一种呈现方式。