1.实现四张图竖排
文件头部加入宏包:
\usepackage{subfigure}
\begin{figure}[htbp]
\centering
\subfigure[1]{ \begin{minipage}[t]{0.36\textwidth}
\centering
\includegraphics[width=1\textwidth]{result2_1.jpg}
\end{minipage}
}
\subfigure[2]{ \begin{minipage}[t]{0.36\textwidth}
\centering
\includegraphics[width=1\textwidth]{result2_2.jpg}
\end{minipage}
}
\subfigure[3.]{ \begin{minipage}[t]{0.36\textwidth}
\centering
\includegraphics[width=1\textwidth]{result2_3.jpg}
\end{minipage}
}
\subfigure[4]{ \begin{minipage}[t]{0.36\textwidth}
\centering
\includegraphics[width=1\textwidth]{result2_4.jpg}
\end{minipage} }
\centering
\caption{XXXXXX}
\end{figure}
2.四张图片两两并排(两行两列)
\begin{figure}[htbp]
\centering
\subfigure[1.]{
\includegraphics[width=5.5cm]{result2_1.jpg}
}
\quad
\subfigure[2.]{
\includegraphics[width=5.5cm]{result2_2.jpg}
}
\quad
\subfigure[3]{
\includegraphics[width=5.5cm]{result2_3.jpg}
}
\quad
\subfigure[4.]{
\includegraphics[width=5.5cm]{result2_4.jpg}
}
\caption{XXXXX.}
\end{figure}
3. 问题
插入之后,图片前后空格很大,没有紧贴文字
在文件头部加入宏包:
\usepackage{float}
并将\begin{figure}[htbp]
换成\begin{figure}[H]
即可。