網格中設定的子圖

網格中設定的子圖

我正在努力將一系列子圖放入 2x3 gri

抱歉,我可以看到之前已經問過類似的問題,我嘗試嘗試建議的內容,但回應似乎非常針對個別用例。除了問題的解決方案之外,我也非常感謝人們提出的任何有助於我理解該問題的評論。

子圖範例

\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}

在此輸入影像描述

相關內容