
我怎麼能確保四個圖(都是相同大小的pdf)以相同的間距出現:看到它們在這裡偏移:
% 實際圖與預測圖
\begin{figure}[H]
\begin{minipage}[b]{0.45\linewidth}
\centering
\includegraphics[width=\textwidth]{figs/immediate_formula_s_avp.pdf}
\hspace{0.1cm}
\end{minipage}
\begin{minipage}[b]{0.45\linewidth}
\centering
\includegraphics[width=\textwidth]{figs/immediate_formula_s_avp.pdf}
\end{minipage}
\begin{minipage}[b]{0.45\linewidth}
\centering
\includegraphics[width=\textwidth]{figs/immediate_formula_s_avp.pdf}
\hspace{0.1cm}
\end{minipage}
\begin{minipage}[b]{0.45\linewidth}
\centering
\includegraphics[width=\textwidth]{figs/immediate_formula_s_avp.pdf}
\end{minipage}
\caption{Actual Versus Predicted Plots}\label{multiavp}
\end{figure}
答案1
我已經對您的程式碼進行了一些修改,例如刪除所有語句:如果您(i)在第一個和第二個之間以及第三個和第四個之間使用指令並且(ii)設定的寬度,則to\centering
不需要它們。順便說一句,我將使用該參數來指定環境的寬度,以及(或其一部分)進行測量\hspace{\fill}
minipage
minipage
\linewidth
\textwidth
minipage
\linewidth
裡面一個minipage
環境。
\documentclass{article}
\usepackage[demo]{graphicx} % leave off demo option in real program
\begin{document}
\begin{figure}
\begin{minipage}[t]{0.45\textwidth}
\includegraphics[width=\linewidth]{figs/immediate_formula_s_avp.pdf}
\caption{Actual Versus Predicted: Immediate}
\label{fig:immediate}
\end{minipage}
\hspace{\fill}
\begin{minipage}[t]{0.45\textwidth}
\includegraphics[width=\linewidth]{figs/proximal_formula_s_avp.pdf}
\caption{Actual Versus Predicted: Proximal}
\label{fig:proximal}
\end{minipage}
\vspace*{0.5cm} % (or whatever vertical separation you prefer)
\begin{minipage}[t]{0.45\textwidth}
\includegraphics[width=\linewidth]{figs/distal_formula_s_avp.pdf}
\caption{Actual Versus Predicted: Distal}
\label{fig:distal}
\end{minipage}
\hspace{\fill}
\begin{minipage}[t]{0.45\textwidth}
\includegraphics[width=\linewidth]{figs/combined_formula_s_avp.pdf}
\caption{Actual Versus Predicted: Combined}
\label{fig:combined}
\end{minipage}
\end{figure}
\end{document}