\usepackage{graphicx}
\usepackage[]{subfig}
\begin{figure}[hbt!]
\centering
\subfloat[\label{Airline:a}]{\includegraphics[width=0.46\textwidth]{a.eps}} \quad
\subfloat[\label{Airline:b}]{\includegraphics[width=0.46\textwidth]{b.eps}} \\
\subfloat[\label{Airline:c}]{\includegraphics[width=0.46\textwidth]{c.eps}} \quad
\subfloat[\label{Airline:d}]{\includegraphics[width=0.46\textwidth]{d.eps}} \\
\caption{Descriptive Statistics}
\label{Airline}
\end{figure}
之前,我把四个图排列成一个 2×2 的矩阵。我可以用表格代替第四个图吗?如果可以,怎么做?另外,我觉得我需要调整尺寸表格是否适合子图矩阵?
\begin{tabular}{lrrrrrrrrrr}
\toprule
{} & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 \\
\midrule
0 & 0.00 & 14.45 & 9.33 & 9.14 & 10.77 & 7.52 & 8.15 & 11.86 & 9.91 & 11.49 \\
1 & 14.45 & 0.00 & 10.13 & 11.73 & 10.17 & 11.12 & 10.61 & 10.74 & 10.09 & 9.93 \\
2 & 9.33 & 10.13 & 0.00 & 8.18 & 7.93 & 7.91 & 7.33 & 8.87 & 7.08 & 8.89 \\
3 & 9.14 & 11.73 & 8.18 & 0.00 & 9.09 & 6.12 & 9.30 & 8.92 & 7.02 & 8.35 \\
4 & 10.77 & 10.17 & 7.93 & 9.09 & 0.00 & 8.00 & 8.78 & 7.58 & 7.38 & 6.01 \\
5 & 7.52 & 11.12 & 7.91 & 6.12 & 8.00 & 0.00 & 6.70 & 9.21 & 6.97 & 8.26 \\
6 & 8.15 & 10.61 & 7.33 & 9.30 & 8.78 & 6.70 & 0.00 & 10.89 & 8.59 & 10.44 \\
7 & 11.86 & 10.74 & 8.87 & 8.92 & 7.58 & 9.21 & 10.89 & 0.00 & 8.47 & 5.43 \\
8 & 9.91 & 10.09 & 7.08 & 7.02 & 7.38 & 6.97 & 8.59 & 8.47 & 0.00 & 6.40 \\
9 & 11.49 & 9.93 & 8.89 & 8.35 & 6.01 & 8.26 & 10.44 & 5.43 & 6.40 & 0.00 \\
\bottomrule
\end{tabular}
答案1
可以,但我们不知道您的纸张有多宽?/边距是多少?/或使用的文档类别。不过,这里有一些建议:
- 使用较小(但仍然可读)的字体大小
\footnotesize
。 - 使用无衬线形状,因为较小的字体更易于阅读
\sffamily
。 - 缩小列间距,
\setlength{\tabcolsep}{2pt}
。 @{}
在表格列说明符周围添加两个s 以修剪任何外部空格。- 最后也是最重要的,考虑使用
sidewaysfigure
来获得更多空间。
\documentclass[12pt,a4paper]{article}
\usepackage[demo]{graphicx}
\usepackage[]{subfig}
\usepackage{rotating,booktabs}
\begin{document}
\begin{sidewaysfigure}[hbt!]
\centering
\subfloat[\label{Airline:a}]{\includegraphics[width=0.46\textwidth]{a.eps}} \quad
\subfloat[\label{Airline:b}]{\includegraphics[width=0.46\textwidth]{b.eps}} \\
\subfloat[\label{Airline:c}]{\includegraphics[width=0.46\textwidth]{c.eps}} \quad
\subfloat[\label{Airline:d}]{\setlength{\tabcolsep}{2pt}\footnotesize\sffamily
\begin{tabular}[b]{@{}lrrrrrrrrrr@{}}
\toprule
{} & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 \\
\midrule
0 & 0.00 & 14.45 & 9.33 & 9.14 & 10.77 & 7.52 & 8.15 & 11.86 & 9.91 & 11.49 \\
1 & 14.45 & 0.00 & 10.13 & 11.73 & 10.17 & 11.12 & 10.61 & 10.74 & 10.09 & 9.93 \\
2 & 9.33 & 10.13 & 0.00 & 8.18 & 7.93 & 7.91 & 7.33 & 8.87 & 7.08 & 8.89 \\
3 & 9.14 & 11.73 & 8.18 & 0.00 & 9.09 & 6.12 & 9.30 & 8.92 & 7.02 & 8.35 \\
4 & 10.77 & 10.17 & 7.93 & 9.09 & 0.00 & 8.00 & 8.78 & 7.58 & 7.38 & 6.01 \\
5 & 7.52 & 11.12 & 7.91 & 6.12 & 8.00 & 0.00 & 6.70 & 9.21 & 6.97 & 8.26 \\
6 & 8.15 & 10.61 & 7.33 & 9.30 & 8.78 & 6.70 & 0.00 & 10.89 & 8.59 & 10.44 \\
7 & 11.86 & 10.74 & 8.87 & 8.92 & 7.58 & 9.21 & 10.89 & 0.00 & 8.47 & 5.43 \\
8 & 9.91 & 10.09 & 7.08 & 7.02 & 7.38 & 6.97 & 8.59 & 8.47 & 0.00 & 6.40 \\
9 & 11.49 & 9.93 & 8.89 & 8.35 & 6.01 & 8.26 & 10.44 & 5.43 & 6.40 & 0.00 \\
\bottomrule
\end{tabular}
} \\
\caption{Descriptive Statistics}
\label{Airline}
\end{sidewaysfigure}
\end{document}
答案2
是的,这是可能的,但是由于表格很大,所以数字看起来不太好看:-(
\documentclass{article}
%--------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%
\usepackage{lipsum} % for dummy text
%---------------------------------------------------------------%
\usepackage{geometry}
\usepackage[demo,
export]{adjustbox}
\usepackage{subfig}
\usepackage{booktabs}
\begin{document}
\begin{figure}[hbt!]
\setkeys{Gin}{width=0.4\textwidth}
\setlength\tabcolsep{2pt}
\subfloat[\label{Airline:a}]{\includegraphics{a}} \hfil
\subfloat[\label{Airline:b}]{\includegraphics{b}}
\medskip
\subfloat[\label{Airline:c}]{\includegraphics[valign=T]{c}} \hfil
\subfloat[\label{Airline:d}]{\footnotesize
\begin{tabular}[t]{lrrrrrrrrrr}
\toprule
{} & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 \\
\midrule
0 & 0.00 & 14.45 & 9.33 & 9.14 & 10.77 & 7.52 & 8.15 & 11.86 & 9.91 & 11.49 \\
1 & 14.45 & 0.00 & 10.13 & 11.73 & 10.17 & 11.12 & 10.61 & 10.74 & 10.09 & 9.93 \\
2 & 9.33 & 10.13 & 0.00 & 8.18 & 7.93 & 7.91 & 7.33 & 8.87 & 7.08 & 8.89 \\
3 & 9.14 & 11.73 & 8.18 & 0.00 & 9.09 & 6.12 & 9.30 & 8.92 & 7.02 & 8.35 \\
4 & 10.77 & 10.17 & 7.93 & 9.09 & 0.00 & 8.00 & 8.78 & 7.58 & 7.38 & 6.01 \\
5 & 7.52 & 11.12 & 7.91 & 6.12 & 8.00 & 0.00 & 6.70 & 9.21 & 6.97 & 8.26 \\
6 & 8.15 & 10.61 & 7.33 & 9.30 & 8.78 & 6.70 & 0.00 & 10.89 & 8.59 & 10.44 \\
7 & 11.86 & 10.74 & 8.87 & 8.92 & 7.58 & 9.21 & 10.89 & 0.00 & 8.47 & 5.43 \\
8 & 9.91 & 10.09 & 7.08 & 7.02 & 7.38 & 6.97 & 8.59 & 8.47 & 0.00 & 6.40 \\
9 & 11.49 & 9.93 & 8.89 & 8.35 & 6.01 & 8.26 & 10.44 & 5.43 & 6.40 & 0.00 \\
\bottomrule
\end{tabular}}
\caption{Descriptive Statistics}
\label{Airline}
\end{figure}
\end{document}
(红线表示文字边框)