目前,我正在使用此代码将子图生成为一个图。
\documentclass[letterpaper,12pt]{article}
\usepackage{caption}
\usepackage{subcaption}
\usepackage[labelfont=bf]{caption}
\usepackage[textfont=bf]{caption}
\usepackage{float}
\begin{figure}[H]
\centering
\begin{subfigure}{0.45\linewidth}
\centering
\includegraphics[width=\linewidth]{BISb2.png}
\caption{$S_b$ in BI}
\label{fig:BIa}
\end{subfigure}
\hfil
\begin{subfigure}{0.45\linewidth}
\includegraphics[width=\linewidth]{HSISb.png}
\caption{$S_b$ in HSI}
\label{fig:HSIa}
\end{subfigure}
\medskip
\begin{subfigure}{0.45\linewidth}
\centering
\includegraphics[width=\linewidth]{BIIb2.png}%, height=0.15\textheight
\caption{$I_b$ in BI}
\label{fig:BIb}
\end{subfigure}
\hfil
\begin{subfigure}{0.45\linewidth}
\centering
\includegraphics[width=\linewidth]{HSIIb.png}
\caption{$I_b$ in HSI}
\label{fig:HSIb}
\end{subfigure}
\medskip
\begin{subfigure}{0.45\linewidth}
\centering
\includegraphics[width=\linewidth]{BISh.png}
\caption{$S_h$ in BI}
\label{fig:BIc}
\end{subfigure}
\hfil
\begin{subfigure}{0.45\linewidth}
\centering
\includegraphics[width=\linewidth]{HSISh.png}
\caption{$S_h$ in HSI}
\label{fig:HSIc}
\end{subfigure}
\medskip
\begin{subfigure}{0.45\linewidth}
\centering
\includegraphics[width=\linewidth]{BIIa.png}
\caption{$I_a$ in BI}
\label{fig:BId}
\end{subfigure}
\hfil
\begin{subfigure}{0.45\linewidth}
\centering
\includegraphics[width=\linewidth]{HSIIa.png}
\caption{$I_a$ in HSI}
\label{fig:HSId}
\end{subfigure}
\medskip
\begin{subfigure}{0.45\linewidth}
\centering
\includegraphics[width=\linewidth]{BIRh.png}
\caption{$R_h$ in BI}
\label{fig:BIe}
\end{subfigure}
\hfil
\begin{subfigure}{0.45\linewidth}
\centering
\includegraphics[width=\linewidth]{HSIRh.png}
\caption{$R_h$ in HSI}
\label{fig:HSIe}
\end{subfigure}
\caption{\small{The figures on the left column represent the state trajectories of the BI (bilinear incidence) models and the figures on the right column correspond to that of HSI (half-saturated incidence) models. The parameter values and initial conditions that are used in both models are listed i Table~\ref{tab:table2}. Observe that the endemic equilibrium point ($E_{AH}^* = (S_b^*, I_b^*, S_h^*, I_a^*, R_h^*) = (1.3950, 1166.4224, 280706.4850, 0.1329, 1342.5412)$) is consistent to the steady state values of $S_b, I_b, S_h, I_a$, and $R_h$ shown in the left column.}}
\label{fig:BItrajectory}
\end{figure}
\end{document}
当前的问题是
图题无法展示所有信息。
子图不可见
我想让子图具有相同的尺寸(高度和宽度)
有没有办法或特定的代码来解决这些问题?
答案1
看起来您需要限制 10 个图表的高度。请务必指定该选项keepaspectratio
以确保避免失真。
按照以下示例所示的代码可能会有所帮助。(请确保demo
在实际文档中删除该选项。)
单独的评论:不要混淆图例和标题。后者通常应该简短明了,让读者一眼就能了解内容figure
。图例可以(也应该)尽可能长,以深入解释读者从阅读图表中应该获得什么。
\documentclass[letterpaper,12pt]{article}
\usepackage[demo]{graphicx} % remove 'demo' option in real doc.
\usepackage[margin=1in]{geometry} % set page parameters appropriately
\usepackage{subcaption}
\captionsetup{font={bf,small},skip=0.25\baselineskip}
\begin{document}
\begin{figure}[p]
\begin{subfigure}{0.475\linewidth}
\includegraphics[width=\linewidth,
height=0.13\textheight,keepaspectratio]{BISb2.png}
\caption{$S_b$ in BI}
\label{fig:BIa}
\end{subfigure}%
\hfill
\begin{subfigure}{0.475\linewidth}
\includegraphics[width=\linewidth,
height=0.13\textheight,keepaspectratio]{HSISb.png}
\caption{$S_b$ in HSI}
\label{fig:HSIa}
\end{subfigure}
\medskip
\begin{subfigure}{0.475\linewidth}
\includegraphics[width=\linewidth,
height=0.13\textheight,keepaspectratio]{BIIb2.png}
\caption{$I_b$ in BI}
\label{fig:BIb}
\end{subfigure}%
\hfill
\begin{subfigure}{0.475\linewidth}
\includegraphics[width=\linewidth,
height=0.13\textheight,keepaspectratio]{HSIIb.png}
\caption{$I_b$ in HSI}
\label{fig:HSIb}
\end{subfigure}
\medskip
\begin{subfigure}{0.475\linewidth}
\includegraphics[width=\linewidth,
height=0.13\textheight,keepaspectratio]{BISh.png}
\caption{$S_h$ in BI}
\label{fig:BIc}
\end{subfigure}%
\hfill
\begin{subfigure}{0.475\linewidth}
\includegraphics[width=\linewidth,
height=0.13\textheight,keepaspectratio]{HSISh.png}
\caption{$S_h$ in HSI}
\label{fig:HSIc}
\end{subfigure}
\medskip
\begin{subfigure}{0.475\linewidth}
\includegraphics[width=\linewidth,
height=0.13\textheight,keepaspectratio]{BIIa.png}
\caption{$I_a$ in BI}
\label{fig:BId}
\end{subfigure}%
\hfill
\begin{subfigure}{0.475\linewidth}
\includegraphics[width=\linewidth,
height=0.13\textheight,keepaspectratio]{HSIIa.png}
\caption{$I_a$ in HSI}
\label{fig:HSId}
\end{subfigure}
\medskip
\begin{subfigure}{0.475\linewidth}
\includegraphics[width=\linewidth,
height=0.13\textheight,keepaspectratio]{BIRh.png}
\caption{$R_h$ in BI}
\label{fig:BIe}
\end{subfigure}%
\hfill
\begin{subfigure}{0.475\linewidth}
\includegraphics[width=\linewidth,
height=0.13\textheight,keepaspectratio]{HSIRh.png}
\caption{$R_h$ in HSI}
\label{fig:HSIe}
\end{subfigure}
\medskip\footnotesize
The figures in the left-hand column represent the state trajectories of the BI (bilinear incidence) models, and the figures in the right-hand column correspond to that of HSI (half-saturated incidence) models. The parameter values and initial conditions that are used in both models are listed in Table~\ref{tab:table2}. Observe that the endemic equilibrium point ($E_{AH}^* = (S_b^*, I_b^*, S_h^*, I_a^*, R_h^*) = (1.3950, 1166.4224, 280706.4850, 0.1329, 1342.5412)$) is consistent with the steady state values of $S_b$, $I_b$, $S_h$, $I_a$, and $R_h$ shown in the left-hand column.
\caption{Ten graphs with legend} % keep caption short and snappy
\label{fig:BItrajectory}
\end{figure}
\end{document}