Latex 上下、左右放置两张图

0、仅放置一张图片

\begin{figure}[!htp]
   \centering
    \setlength{\belowcaptionskip}{-0.1cm}   %调整图片标题与下文距离
    \captionsetup{font={footnotesize}} % 修改Fig.后面字体大小
    \includegraphics[height = 5.0cm, width = 6.4 cm]{Sample_4.eps}
    \caption{\;\;Average eavesdropping rate.}
    \label{fig4}  %  用于交叉引用
\end{figure}

 

1、上下放置两张图

\begin{figure}[htbp]
    \centering
    %\setlength{\belowcaptionskip}{-0.5cm}   %调整图片标题与下文距离
    \captionsetup{font={footnotesize}}
    \subfigure[]{
    \begin{minipage}{6cm}
    \centering
    \includegraphics[height = 4.8cm, width = 5.9 cm]{Sample_4.eps}
    \end{minipage}
    }
    \subfigure[]{
    \begin{minipage}{6cm}
    \centering
    %\setlength{\belowcaptionskip}{-0.5cm}   %调整图片标题与下文距离
    \includegraphics[height = 4.5cm, width = 5.9 cm]{Sample_4b.eps}
    \end{minipage}
    }
    \caption{\;\;(a) Average eavesdropping rate . %(b) Absolute error .}
    \label{fig4}
\end{figure}

2、左右放置两张图

\begin{figure}[htbp]
\begin{minipage}[t]{0.45\linewidth}
\centering
\setlength{\belowcaptionskip}{-0.1cm}   %调整图片标题与下文距离
\captionsetup{font={footnotesize}} % 修改Fig.后面字体大小
\includegraphics[height=4cm,width=4.2cm]{Sample_4.eps}
\caption{(a)}
\end{minipage}%
\begin{minipage}[t]{0.45\linewidth}
\centering
\includegraphics[height=4cm,width=4.2cm]{Fig4(b).eps}
\caption{(b)}
\end{minipage}
\end{figure}

你可能感兴趣的:(学习笔记)