在一页中设置 4X2 图形

在一页中设置 4X2 图形

我无法将所有图片 (4X2) 放在一页中,但它可以容纳 6 张图片 (3X2),并且页面上有足够的空间。有什么建议吗?

    \begin{figure}[ht] 
  \begin{subfigure}[b]{0.5\linewidth}
    \centering
    \includegraphics[width=0.75\linewidth]{images/changes/R1_N_Net1.pdf} 
    \caption{\footnotesize Network 1, Hill-function-based method} 
    \label{fig:output of knock R1_N_1} 
    \vspace{4ex}
  \end{subfigure}%% 
  \begin{subfigure}[b]{0.5\linewidth}
    \centering
    \includegraphics[width=0.75\linewidth]{images/changes/R1_N_Net4.pdf} 
    \caption{\footnotesize Network 4, Hill-function-based method} 
    \label{fig:output of knock R1_N_4} 
    \vspace{4ex}
  \end{subfigure} 
  \begin{subfigure}[b]{0.5\linewidth}
    \centering
    \includegraphics[width=0.75\linewidth]{images/changes/R1_N_Net_r2.pdf} 
    \caption{\footnotesize Network 2, Not fixed half-lives} 
    \label{fig:output of knock R1_N_r_2} 
    \vspace{4ex}
  \end{subfigure} 
\begin{subfigure}[b]{0.5\linewidth}
    \centering
    \includegraphics[width=0.75\linewidth]{images/changes/R1_N_Net_r6.pdf} 
    \caption{\footnotesize Network 6, Not fixed half-lives} 
    \label{fig:output of knock R1_N_r_6} 
    \vspace{4ex}
  \end{subfigure} 
  \begin{subfigure}[b]{0.5\linewidth}
    \centering
    \includegraphics[width=0.75\linewidth]{images/changes/R1_N_Net8.pdf} 
    \caption{\footnotesize Network 8, Hill-function-based method} 
    \label{fig:output of knock R1_N_8} 
  \end{subfigure}%%
  \begin{subfigure}[b]{0.5\linewidth}
    \centering
    \includegraphics[width=0.75\linewidth]{images/changes/R1_C_Net2.pdf} 
    \caption{\footnotesize Network 2, gene circuit method} 
    \label{fig:output of knock R1_C_2} 
  \end{subfigure} 
   \begin{subfigure}[b]{0.5\linewidth}
    \centering
    \includegraphics[width=0.75\linewidth]{images/changes/R1_C_Net5.pdf} 
    \caption{\footnotesize Network 5, gene circuit method} 
    \label{fig:output of knock R1_C_5} 
  \end{subfigure}%%
  \begin{subfigure}[b]{0.5\linewidth}
    \centering
    \includegraphics[width=0.75\linewidth]{images/changes/R1_C_Net7.pdf} 
    \caption{\footnotesize Network 7, gene circuit method} 
    \label{fig:output of knock R1_C_7} 
  \end{subfigure} 
  \caption[Knockdown of proposed interactions in region R1]{\footnotesize Knockdown of proposed interactions in region R1}
  \label{fig:output of knock R1} 
\end{figure}

答案1

除了指定环境中图像的宽度外subfigure,您还可以指定它们的高度。另外,不要\vspace{4ex}在每个 内插入subfigure;只需将此指令插入子图 3、5 和 7 之前即可。由于每个subfigure以及 的figure整体都有标题,并且考虑到\vspace{4ex}指令带来的额外垂直间距,图像高度0.18\textheight似乎可以确保整个figure环境适合页面,而不会figure超出文本块的边距。

另外,由于看起来(虽然我不能确定,因为你没有发布完整的 MWE)你正在使用该subcaption环境,所以你应该提供说明

\captionsetup[figure]{size=footnotesize}

在序言中。这可以为您节省 9 个\footnotesize指令(8 个子图,1 个图)。通过这种方式,您还可以避免字符串“图 1:”与标题其余部分的字体大小出现(可能不想要的)差异。而且,如果您决定将图和子图标题的字体大小更改为“小”,您可以通过更改序言中的单个设置来进行更改,而不必经历大量\caption指令。

最后,我不得不说,我注意到子图标题的文本与其(字母)编号不同步。这可能会让一些读者感到困惑。

在此处输入图片描述

\documentclass{article}
\usepackage[demo]{graphicx} % leave off "demo" option in real document
\usepackage{subcaption} % for "subfigure" environment
\captionsetup[figure]{size=footnotesize}
   %% font size for figure and subfigure captions
\usepackage[showframe]{geometry} % leave off "showframe" option in real document
\begin{document}

\begin{figure}[ht]    
  \begin{subfigure}[b]{0.48\linewidth}
    \centering
    \includegraphics[height=0.18\textheight]{images/changes/R1_N_Net1.pdf} 
    \caption{Network 1, Hill-function-based method} 
    \label{fig:output of knock R1_N_1} 
  \end{subfigure} 
  \hspace{\fill}  %% maximize space between adjacent subfigures
  \begin{subfigure}[b]{0.48\linewidth}
    \centering
    \includegraphics[height=0.18\textheight]{images/changes/R1_N_Net4.pdf} 
    \caption{Network 4, Hill-function-based method} 
    \label{fig:output of knock R1_N_4} 
  \end{subfigure} 

  \vspace{4ex}  %% extra vertical space
  \begin{subfigure}[b]{0.48\linewidth}
    \centering
    \includegraphics[height=0.18\textheight]{images/changes/R1_N_Net_r2.pdf} 
    \caption{Network 2, Not fixed half-lives} 
    \label{fig:output of knock R1_N_r_2} 
  \end{subfigure} 
  \hspace{\fill}
  \begin{subfigure}[b]{0.48\linewidth}
    \centering
    \includegraphics[height=0.18\textheight]{images/changes/R1_N_Net_r6.pdf} 
    \caption{Network 6, Not fixed half-lives} 
    \label{fig:output of knock R1_N_r_6} 
  \end{subfigure} 

    \vspace{4ex}
  \begin{subfigure}[b]{0.48\linewidth}
    \centering
    \includegraphics[height=0.18\textheight]{images/changes/R1_N_Net8.pdf} 
    \caption{Network 8, Hill-function-based method} 
    \label{fig:output of knock R1_N_8} 
  \end{subfigure}
  \hspace{\fill}
  \begin{subfigure}[b]{0.48\linewidth}
    \centering
    \includegraphics[height=0.18\textheight]{images/changes/R1_C_Net2.pdf} 
    \caption{Network 2, gene circuit method} 
    \label{fig:output of knock R1_C_2} 
  \end{subfigure} 

    \vspace{4ex}
   \begin{subfigure}[b]{0.48\linewidth}
    \centering
    \includegraphics[height=0.18\textheight]{images/changes/R1_C_Net5.pdf} 
    \caption{Network 5, gene circuit method} 
    \label{fig:output of knock R1_C_5} 
  \end{subfigure}
  \hspace{\fill}
  \begin{subfigure}[b]{0.48\linewidth}
    \centering
    \includegraphics[height=0.18\textheight]{images/changes/R1_C_Net7.pdf} 
    \caption{Network 7, gene circuit method} 
    \label{fig:output of knock R1_C_7} 
  \end{subfigure} 

\caption{Knockdown of proposed interactions in region R1}
\label{fig:output of knock R1} 
\end{figure}

\end{document}

相关内容