打印包含 8 个子图的图形,不删除某些子图重叠部分,也不显示完整内容

打印包含 8 个子图的图形,不删除某些子图重叠部分,也不显示完整内容

我有一个由 8 个子图组成的图形:顶部有 4 个子图,底部有 4 个子图。问题是 x 轴的末端并不总是可见,因为一些子图与其他子图重叠并阻止打印 x 轴的末端,如以下屏幕截图所示。如何解决这个问题?

在此处输入图片描述

\documentclass[xcolor=table,sigconf,review,anonymous]{acmart}
\usepackage{booktabs, makecell, multirow, tabularx}
\usepackage{siunitx}

%%
%% \BibTeX command to typeset BibTeX logo in the docs
% \AtBeginDocument{%
%   \providecommand\BibTeX{{%
%     \normalfont B\kern-0.5em{\scshape i\kern-0.25em b}\kern-0.8em\TeX}}}

%\acmYear{2020}\copyrightyear{2020}
%\setcopyright{acmlicensed}
%\acmConference[ICSSP '20]{International Conference on Software and Systems Process}{May 23--24, 2020}{Seoul, Republic of Korea}
%\acmBooktitle{International Conference on Software and Systems Process (ICSSP '20), May 23--24, 2020, Seoul, Republic of Korea}
%\acmPrice{15.00}
%\acmDOI{10.1145/3379177.3388900}
%\acmISBN{978-1-4503-7512-2/20/05}


%\usepackage[utf8]{inputenc}

% \IEEEoverridecommandlockouts
% The preceding line is only needed to identify funding in the first footnote. If that is unneeded, please comment it out.
%\usepackage{cite}

%\usepackage[textsize=tiny]{todonotes}
% \newcommand{\cmd}[1]{{\color{blue}CMD:  {#1}}}%
 %\newcommand{\mh}[1]{{\color{red}MH: {#1}}}%
 %\newcommand{\ae}[1]{{\color{orange}AE: {#1}}}%

\usepackage{amsmath,amssymb,amsfonts}
\usepackage{algorithmic}
\usepackage{graphicx}
\usepackage{textcomp}
\usepackage{tabularx}
\usepackage{graphicx}
\usepackage{algorithm}
\usepackage{textcomp}
\usepackage{multirow}
\usepackage{subcaption}
\usepackage[table,xcdraw]{xcolor}
\usepackage{multirow, tabularx, ragged2e}
\usepackage[demo]{graphicx}
\usepackage{subcaption}
\usepackage{verbatim}
\usepackage{unicode-math}
\begin{document}

\title{test}
\maketitle

\begin{figure*}
\begin{subfigure}{.24\textwidth}
\centering
\includegraphics[width=5cm,height=4cm]{TracePrecisionVsTtoNError.png}
\caption{T trace Precision \% versus T$\rightarrow$N errors Seeding}
\label{TracePrecisionTError}
\end{subfigure}\hfill
\begin{subfigure}{.24\textwidth}
\centering
\includegraphics[width=5cm,height=4cm]{TracePrecisionVsTtoNError.png}
\caption{N trace Precision \% versus T$\rightarrow$N errors Seeding}
\label{NoTracePrecisionTError}
\end{subfigure}\hfill
\begin{subfigure}{.24\textwidth}
\centering
\includegraphics[width=5cm,height=4cm]{TracePrecisionVsTtoNError.png}
\caption{T trace Recall \% versus T$\rightarrow$N errors Seeding}
\label{TraceRecallTError}
\end{subfigure}\hfill
\begin{subfigure}{.24\textwidth}
\centering
\includegraphics[width=5cm,height=4cm]{TracePrecisionVsTtoNError.png}
\caption{N trace Recall \% versus T$\rightarrow$N errors Seeding}
\label{NoTraceRecallTError}
\end{subfigure}\hfill

\begin{subfigure}{.24\textwidth}
\centering
\includegraphics[width=5cm,height=4cm]{TracePrecisionVsTtoNError.png}
\caption{T trace Precision \% versus N$\rightarrow$T errors Seeding}
\label{TracePrecisionNError}
\end{subfigure}
\begin{subfigure}{.24\textwidth}
\centering
\includegraphics[width=5cm,height=4cm]{TracePrecisionVsTtoNError.png}
\caption{N trace Precision \% versus N$\rightarrow$T errors Seeding}
\label{NoTracePrecisionNError}
\end{subfigure}
\begin{subfigure}{.24\textwidth}
\centering
\includegraphics[width=5cm,height=4cm]{TracePrecisionVsTtoNError.png}
\caption{T trace Recall \% versus N$\rightarrow$T errors Seeding}
\label{TraceRecallNError}
\end{subfigure}
\begin{subfigure}{.24\textwidth}
\centering
\includegraphics[width=5cm,height=4cm]{TracePrecisionVsTtoNError.png}
\caption{N trace Recall \% versus N$\rightarrow$T errors Seeding}
\label{NoTraceRecallNError}
\end{subfigure}
\caption{T trace/N trace Precision/Recall when seeding T$\rightarrow$N/N$\rightarrow$T errors}
\label{PrecisionRecall}
\end{figure*}

\end{document}

这是示例图片

在此处输入图片描述

答案1

一旦我删除了所有虚假的包调用,示例就可以无错误地运行:

\RequirePackage[demo]{graphicx}
\documentclass[xcolor=table,sigconf,review,anonymous]{acmart}



\usepackage{subcaption}


\begin{document}

\title{test}
\maketitle

\begin{figure*}
\begin{subfigure}{.24\textwidth}
\centering
\includegraphics[width=5cm,height=4cm]{TracePrecisionVsTtoNError.png}
\caption{T trace Precision \% versus T$\rightarrow$N errors Seeding}
\label{TracePrecisionTError}
\end{subfigure}\hfill
\begin{subfigure}{.24\textwidth}
\centering
\includegraphics[width=5cm,height=4cm]{TracePrecisionVsTtoNError.png}
\caption{N trace Precision \% versus T$\rightarrow$N errors Seeding}
\label{NoTracePrecisionTError}
\end{subfigure}\hfill
\begin{subfigure}{.24\textwidth}
\centering
\includegraphics[width=5cm,height=4cm]{TracePrecisionVsTtoNError.png}
\caption{T trace Recall \% versus T$\rightarrow$N errors Seeding}
\label{TraceRecallTError}
\end{subfigure}\hfill
\begin{subfigure}{.24\textwidth}
\centering
\includegraphics[width=5cm,height=4cm]{TracePrecisionVsTtoNError.png}
\caption{N trace Recall \% versus T$\rightarrow$N errors Seeding}
\label{NoTraceRecallTError}
\end{subfigure}\hfill

\begin{subfigure}{.24\textwidth}
\centering
\includegraphics[width=5cm,height=4cm]{TracePrecisionVsTtoNError.png}
\caption{T trace Precision \% versus N$\rightarrow$T errors Seeding}
\label{TracePrecisionNError}
\end{subfigure}\hfill
\begin{subfigure}{.24\textwidth}
\centering
\includegraphics[width=5cm,height=4cm]{TracePrecisionVsTtoNError.png}
\caption{N trace Precision \% versus N$\rightarrow$T errors Seeding}
\label{NoTracePrecisionNError}
\end{subfigure}\hfill
\begin{subfigure}{.24\textwidth}
\centering
\includegraphics[width=5cm,height=4cm]{TracePrecisionVsTtoNError.png}
\caption{T trace Recall \% versus N$\rightarrow$T errors Seeding}
\label{TraceRecallNError}
\end{subfigure}\hfill
\begin{subfigure}{.24\textwidth}
\centering
\includegraphics[width=5cm,height=4cm]{TracePrecisionVsTtoNError.png}
\caption{N trace Recall \% versus N$\rightarrow$T errors Seeding}
\label{NoTraceRecallNError}
\end{subfigure}
\caption{T trace/N trace Precision/Recall when seeding T$\rightarrow$N/N$\rightarrow$T errors}
\label{PrecisionRecall}
\end{figure*}

\end{document}

然后你得到

Overfull \hbox (20.7502pt too wide) in paragraph at lines 64--65

多次打印,因为 5cm 宽的图像不适合您指定的空间。这解释了过度打印。

此外,您不应指定高度和宽度,否则会扭曲图像,只需指定其中一个即可。这里width=\linewidth将使其适合子图。

将所有实例更改为[width=5cm,height=4cm]使其[width=\linewidth]运行而不会出现过满框警告。

相关内容