在文献撰写过程中,有时需要进行多图片的比较,下面是解决办法。
使用\begin{figure}[h]包起来图片的代码。
\caption{xxxxx}为图片加入说明。
\begin{minipage}{0.149\linewidth}来进行分列。
在\begin{minipage}中放多个\centerline{\includegraphics[width=\textwidth]{1.png}}可以实现多行。
\centerline{Image}为每列单独加入说明。
其中\begin{minipage}{0.48\linewidth}中的{0.48\linewidth}表示的控制列的宽度,如果是两列就可以除2然后减去0.1,切记多列的宽度加起来不要等于1,否则可能因为空间不足,latex会帮你自动换行,可以是0.98。
代码如下:
\begin{figure}[h]
\begin{minipage}{0.32\linewidth}
\vspace{3pt}
%图片路径
\centerline{\includegraphics[width=\textwidth]{1.png}}
%图片说明
\centerline{Image1}
\end{minipage}
\begin{minipage}{0.32\linewidth}
\vspace{3pt}
\centerline{\includegraphics[width=\textwidth]{2.png}}
\centerline{Image2}
\end{minipage}
\begin{minipage}{0.32\linewidth}
\vspace{3pt}
\centerline{\includegraphics[width=\textwidth]{3.png}}
\centerline{Image3}
\end{minipage}
\caption{Visual comparisons of original models.}
\label{fig1}
\end{figure}
代码如下:
\begin{figure}[!htb]\small
\centering
\begin{tabular}{c}
\includegraphics[scale=0.40]{a.png} \\%换行
{\footnotesize\sf (a) Statistics on the number of interest packets.} \\
\includegraphics[scale=0.40]{b.png} \\
{\footnotesize\sf (b) Statistics on the number of data packets.}
\end{tabular}
\caption{Number of interest packets and data packets}
\label{fig2}
\end{figure}