我有 6 个图表,我将 2 个图表排成一行(平行),这意味着 6 个图表使用 3 行。现在它在垂直方向上有了更多的空间(可以在图中看到红色的)和水平(可以在图片中看到穿蓝色衣服)。
请帮帮我,如何在水平和垂直方向上缩小子图之间的尺寸?
\begin{figure}[ht]
\centring
\begin{subfigure}[b]{0.45\textwidth}
\centring
\includegraphics[scale=0.45]{RHKNN.eps}
\caption{}
\label{fig:a1}
\end{subfigure}
\hfill
\centring
\begin{subfigure}[b]{0.45\textwidth}
\centring
\includegraphics[scale=0.45]{LHKNN.eps}
\caption{}
\label{fig:b1}
\end{subfigure}
\newline
%\par\midskip % force a bit of vertical whitespace
%\centring
\begin{subfigure}[b]{0.45\textwidth}
\centring
\includegraphics[scale=0.45]{TPKNN.eps}
\caption{}
\label{fig:c1}
\end{subfigure}
\hfill
\centring
\begin{subfigure}[b]{0.45\textwidth}
\centring
\includegraphics[scale=0.45]{RHDT.eps}
\caption{}
\label{fig:d1}
\end{subfigure}\\
%\par\midskip % force a bit of vertical whitespace
\centring
\begin{subfigure}[b]{0.45\textwidth}
\centring
\includegraphics[scale=0.45]{LHDT.eps}
\caption{}
\label{fig:e1}
\end{subfigure}
\hfill
\centring
\begin{subfigure}[b]{0.45\textwidth}
\centring
\includegraphics[scale=0.45]{TPDT.eps}
\caption{}
\label{fig:f1}
\end{subfigure}
\hfill
\caption{The impact of long ABC; ~\ref{fig:a1} a by using K; ~\ref{fig:b1} H position by using K; ~\ref{fig:c1} f by using K; ~\ref{fig:d1} z by using D; ~\ref{fig:e1} a by using D; ~\ref{fig:f1} T position by using D}
\label{fig 4:gr2}
\end{figure}
答案1
经过10到12个小时的努力,我找到了一些解决方案,我\hfill
从代码中删除并使用\begin{figure*}[t!]
了\begin{figure}[ht]
。
以下是代码:
\begin{figure*}[t!]
\centring
\begin{subfigure}[b]{0.45\textwidth}
\centring
\includegraphics[scale=0.45]{RHKNN.eps}
\caption{}
\label{fig:a1}
\end{subfigure}
\centring
\begin{subfigure}[b]{0.45\textwidth}
\centring
\includegraphics[scale=0.45]{LHKNN.eps}
\caption{}
\label{fig:b1}
\end{subfigure}
\begin{subfigure}[b]{0.45\textwidth}
\centring
\includegraphics[scale=0.45]{TPKNN.eps}
\caption{}
\label{fig:c1}
\end{subfigure}
\centring
\begin{subfigure}[b]{0.45\textwidth}
\centring
\includegraphics[scale=0.45]{RHDT.eps}
\caption{}
\label{fig:d1}
\end{subfigure}\\
\centring
\begin{subfigure}[b]{0.45\textwidth}
\centring
\includegraphics[scale=0.45]{LHDT.eps}
\caption{}
\label{fig:e1}
\end{subfigure}
\centring
\begin{subfigure}[b]{0.45\textwidth}
\centring
\includegraphics[scale=0.45]{TPDT.eps}
\caption{}
\label{fig:f1}
\end{subfigure}
\caption[A set of six sub figures.]{The impact of ABC:
\textbf{(\subref{fig:a1})} app by using K;
\textbf{(\subref{fig:b1})} La by using Ka;
\textbf{(\subref{fig:c1})} Ta by using K;
\textbf{(\subref{fig:d1})} Ra by using Da;
\textbf{(\subref{fig:e1})} Aa by using Db;
\textbf{(\subref{fig:f1})} To by using Da
}%
\label{fig 4:gr2}
\end{figure*}