Latex并列图形(不是subfigure)的画法,用到figure和minipage

    \begin{figure}   
      \begin{minipage}[t]{0.5\linewidth} % 如果一行放2个图,用0.5,如果3个图,用0.33  
        \centering   
        \includegraphics[width=1in]{graphic.eps}   
        \caption{Small Box}   
        \label{fig:side:a}   
      \end{minipage}%   
      \begin{minipage}[t]{0.5\linewidth}   
        \centering   
        \includegraphics[width=1.5in]{graphic.eps}   
        \caption{Big Box}   
        \label{fig:side:b}   
      \end{minipage}   
    \end{figure} 

如果是双栏排版的话,则使用

    \begin{figure*}
    \end{figure*}   

今天整理了下想实现一个2*2图片排列的效果。minipage的代码如下:

begin{figure}

%\begin{tabular}{cc}   

\begin{minipage}{0.48\linewidth}

  \centerline{\includegraphics[width=4.0cm]{image1.jpg}}

  \centerline{(a) Result 1}

\end{minipage}

\hfill

\begin{minipage}{.48\linewidth}

  \centerline{\includegraphics[width=4.0cm]{image2.jpg}}

  \centerline{(b) Results 2}

\end{minipage}

\vfill

\begin{minipage}{0.48\linewidth}

  \centerline{\includegraphics[width=4.0cm]{image3.jpg}}

  \centerline{(c) Result 3}

\end{minipage}

\hfill

\begin{minipage}{0.48\linewidth}

  \centerline{\includegraphics[width=4.0cm]{image4.jpg}}

  \centerline{(d) Result 4}

\end{minipage}

%\end{tabular}

\caption{Example of placing a figure with experimental results.}

\label{fig:res}

\end{figure}

发现有\vfill 与空行的效果完全一样,一般在使用的过程中,每弄一个minipage,最好都使用\vfill or \hfill来表达下一张图片与上一张图片 的关系,是上下排的关系还是并排的关系。

当然还可以使用

\begin{figure*}

\end{figure*}来破栏,因为好多paper的格式是双栏的,所以有时候放图片可以破栏放置。

当然图片属性还有如下的格式

\begin{figure}[bhtp]

\end{figure}

 在这里补充说一下浮动图形figure环境, 它能自动调整图形在页 面中出现的位置: 
\begin{figure}[位置] 
\caption{图的标题} 
\end{figure} 

这里[位置]可以是h(当前位置),t(页顶),b(页底),p(另页),如果前面加了个!(感叹号),那么则是忽略
美学标准,强制排列了.

猜你喜欢

转载自blog.csdn.net/markpen/article/details/42440965