我正在尝试使用 latex 和 生成一个包含 5 个子图的图形subfig
。第一个子图Network
需要很大且位于左侧,而其他四个是图形,应该平铺到与网络图像相同的高度,但位于右侧,即整个图形的形状为矩形。使用 latex 可以做到这一点吗?
这是我目前的代码,假设所有相关图像都位于 ccurrent 目录中名为的文件夹中Images
:
\documentclass{article}
\usepackage{natbib}
\usepackage[margin=0.5in]{geometry}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{ragged2e}
\usepackage{subfig}
\usepackage{grffile}
\usepackage{cleveref}
\graphicspath{ {Images/} }
\begin{document}
\begin{figure}[h]
\centering
\subfloat[Network]{%
\includegraphics[width=1\textwidth]{ODENetwork}}
\subfloat[$k_{delay}=0.001$]{%
\includegraphics[width=0.4\textwidth]{"reduced_0.001_delaySimulation"}\label{reduceda}}
\subfloat[$k_{delay}=0.01$]{%
\includegraphics[width=0.4\textwidth]{"reduced_0.01_delaySimulation"}\label{reducedb}}\\
\subfloat[$k_{delay}=0.1$]{%
\includegraphics[width=0.4\textwidth]{"reduced_0.1_delaySimulation"}\label{reducedc}}
\subfloat[$k_{delay}=1$]{%
\includegraphics[width=0.4\textwidth]{"reduced_1_delaySimulation"}\label{reducedd}}\\
\caption{Simulation of model described by \cref{ODE1} }
\label{reduced}
\end{figure}
\end{document}
答案1
这是subcaption
版本。只需调整宽度即可适应您的图像。
\documentclass{article}
\usepackage{natbib}
\usepackage[margin=0.5in]{geometry}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{ragged2e}
\usepackage{subcaption}
\usepackage{grffile}
\usepackage{cleveref}
\begin{document}
\begin{figure}[h]
\centering
\begin{subfigure}{.475\textwidth}
\includegraphics[width=\textwidth]{example-image}
\caption[Network]{ODENetwork}
\end{subfigure}\hfill
\parbox{.475\textwidth}{
\begin{subfigure}{.475\linewidth}
\includegraphics[width=\textwidth]{example-image}
\caption{Test 1}
\end{subfigure}
\begin{subfigure}{.475\linewidth}
\includegraphics[width=\textwidth]{example-image}
\caption{Test 2}
\end{subfigure}\\
\begin{subfigure}{.475\linewidth}
\includegraphics[width=\textwidth]{example-image}
\caption{Test 3}
\end{subfigure}
\begin{subfigure}{.475\linewidth}
\includegraphics[width=\textwidth]{example-image}
\caption{Test 4}
\end{subfigure}
}
\caption{Simulation of model described by ODE1}\label{reduced}
\end{figure}
\end{document}