我正在努力将一系列子图放置在 2x3 网格中
抱歉,我看到之前有人问过类似的问题,我也尝试过建议的方法,但答案似乎针对具体用例。我也很感激大家能提出任何有助于我理解问题的评论,以及解决问题的方法。
\documentclass[english]{report}
\usepackage[left=2cm, right=2cm, top=3cm]{geometry}
\usepackage{subfiles}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{lscape}
\usepackage{pdflscape}
\begin{document}
\begin{landscape}
\graphicspath{{figures/dig_simulations/}}
\begin{figure}
\centering
\begin{subfigure}[t]{2in}
\caption{Tversky \& Kahneman}
\includegraphics[width=2in]{TK_1.png}
\end{subfigure}
\begin{subfigure}[t]{2in}
\caption{Lattimore}
\includegraphics[width=2in]{Lattimore_1.png}
\end{subfigure}
\begin{subfigure}[t]{2in}
\caption{Lattimore}
\includegraphics[width=2in]{Lattimore_2.png}
\end{subfigure}
\begin{subfigure}[t]{2in}
\caption{Lattimore}
\includegraphics[width=2in]{Lattimore_3.png}
\end{subfigure}
\medskip
\begin{subfigure}[t]{2in}
\centering
\caption{Prelec}
\includegraphics[width=2in]{Prelec_1.png}
\end{subfigure}
\caption{Prelec}%\label{fig:2b}
\begin{subfigure}[t]{2in}
\centering
\caption{Prelec}
\includegraphics[width=2in]{Prelec_2.png}
\end{subfigure}
\begin{subfigure}[t]{2in}
\end{subfigure}
\begin{subfigure}[t]{2in}
\centering
\includegraphics[width=2in]{Prelec_3.png}
\end{subfigure}
\caption{example caption}
\end{figure}
\end{landscape}
\end{document}
答案1
在下面的代码中,我注释掉了原始示例中的某些行,并添加了四行(以 突出显示<-----
):
\documentclass[english]{report}
\usepackage[left=2cm, right=2cm, top=3cm]{geometry}
\usepackage{subfiles}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{lscape}
\usepackage{pdflscape}
\begin{document}
\begin{landscape}
\graphicspath{{figures/dig_simulations/}}
\begin{figure}
\centering
\begin{subfigure}[t]{2in}
\caption{Tversky \& Kahneman}
\includegraphics[width=2in]{TK_1.png}
\end{subfigure}
\begin{subfigure}[t]{2in}
\caption{Lattimore}
\includegraphics[width=2in]{Lattimore_1.png}
\end{subfigure}
\begin{subfigure}[t]{2in}
\caption{Lattimore}
\includegraphics[width=2in]{Lattimore_2.png}
\end{subfigure}
\medskip % <-------------------------------
\begin{subfigure}[t]{2in}
\caption{Lattimore}
\includegraphics[width=2in]{Lattimore_3.png}
\end{subfigure}
% \medskip
\begin{subfigure}[t]{2in}
\centering
\caption{Prelec}
\includegraphics[width=2in]{Prelec_1.png}
\end{subfigure}
% \caption{Prelec}%\label{fig:2b}
\begin{subfigure}[t]{2in}
\centering
\caption{Prelec}
\includegraphics[width=2in]{Prelec_2.png}
\end{subfigure}
% \begin{subfigure}[t]{2in}
% \end{subfigure}
\medskip % <-------------------------------
\begin{subfigure}[t]{2in}
\centering
\caption{test}
\includegraphics[width=2in]{Prelec_3.png}
\end{subfigure}
\caption{example caption}
\end{figure}
\end{landscape}
\end{document}