我使用 subfigure 和 \hfill 将两个子图设置为彼此相邻,我希望图 (d,e) 彼此相邻,而图 (f,g) 在同一行中彼此相邻。但他们并不在同一条线上。这是我的乳胶代码:
\begin{figure*}[ht]
\subfigure[]{\includegraphics[height=0.45in]{figures/ch3Ex2Picture1a.png} }
\label{fig1b}
\hfill
\subfigure[]{\includegraphics [height=0.45in]{figures/ch3Ex2Picture1b.png}}
\label{fig1c}
\hfill
\subfigure[]{\includegraphics[height=1.2in]{figures/ch3Ex2Picture1c.png} } \hfill
\label{fig1d}
\subfigure[]{\includegraphics[height=.8in]{figures/ch3Ex2Picture2.png}}
\label{fig1a}
\hfill
\subfigure[]{
\includegraphics[height=.8in]{figures/ch3Ex2Picture3.png}}
\label{fig1e}
\subfigure[]{
\includegraphics[height=.88in]{figures/ch3Ex2Picture4.png}}
\label{fig1a}
\hfill
\subfigure[]{
\includegraphics[height=.88in]{figures/ch3Ex2Picture5.png}}
\label{fig1e}
\caption{Illustration examples}
\label{Ex2fig3}
\end{figure*}
代码在这里
这应该看起来更像这样,注意
\textwidth
的使用、标签的位置以及换行符:
\begin{figure*}[ht]
\centering
\subfigure[\label{line1a}]{\includegraphics[width=\textwidth*0.3]{figures/line1a.png}}
\hfill
\subfigure[\label{line1b}]{\includegraphics[width=\textwidth*0.3]{figures/line1b.png}}
\hfill
\subfigure[\label{line1c}]{\includegraphics[width=\textwidth*0.3]{figures/line1c.png}}
\\ % next line
\subfigure[\label{line2a}]{\includegraphics[width=\textwidth*0.45]{figures/line2a.png}}
\hfill
\subfigure[\label{line2b}]{\includegraphics[width=\textwidth*0.45]{figures/line2b.png}}
\end{figure*}
在几乎所有情况下,我也会使用
\centering
并使用数字来改进布局。最重要和最明显的事情是使用 width
而不是 height
进行水平放置。