如何将 5x5 网格图像放在会议论文 IEEEtran 格式的整页中

如何将 5x5 网格图像放在会议论文 IEEEtran 格式的整页中

但我明白这一点,因为页面被分成了两个部分。 我想要类似上面的东西

我想要这样的东西 但我明白这一点,因为页面被分成了两个部分。

有人能帮我解决这个问题吗?我尝试了以下两种方法,但都无法将图像放在整个页面中:

enter code here
-------Option 1------------
\begin{figure}[htp]

\centering
\includegraphics[width=.1\textwidth]{images/T1_W5.png}\hfill
\includegraphics[width=.1\textwidth]{images/T1_W9.png}\hfill
\includegraphics[width=.1\textwidth]{images/T1_W11.png}\hfill
\includegraphics[width=.1\textwidth]{images/T1_W15.png}\hfill

\caption{default}
\label{fig:figure3}

\end{figure}
-----------Option 2-----
\begin{figure}

\begin{tabular}{cccc}
{\includegraphics[width = .5in]{T1.png}} &
{\includegraphics[width = .75in]{T2.png}} &
{\includegraphics[width = .7in]{T3.png}} &
{\includegraphics[width = .7in]{T4.png}}&\\
{\includegraphics[width = .5in]{T1.png}} &
{\includegraphics[width = .75in]{T2.png}} &
{\includegraphics[width = .7in]{T3.png}} &
{\includegraphics[width = .7in]{T4.png}}&

\end{tabular}
\caption{Input Images}

\end{figure}
\begin{figure*}[p]

\begin{tabular}{ccccc}
\subfloat[a ]{\includegraphics[width = 0.6in]{T1.png}} &
{\includegraphics[width=0.2\textwidth]{images/T1_W5.png}} &
{\includegraphics[width=0.2\textwidth]{images/T1_W9.png}} &
{\includegraphics[width=0.2\textwidth]{images/T1_W11.png}}&
{\includegraphics[width=0.2\textwidth]{images/T1_W15.png}} &\\
{\includegraphics[width = 0.6in]{T2.png}} &
{\includegraphics[width=0.2\textwidth]{images/T2_W5.png}} &
{\includegraphics[width=0.2\textwidth]{images/T2_W9.png}} &
{\includegraphics[width=0.2\textwidth]{images/T2_W11.png}}&
{\includegraphics[width=0.2\textwidth]{images/T2_W15.png}} &\\
{\includegraphics[width = 0.6in]{T3.png}} &
{\includegraphics[width=0.2\textwidth]{images/T3_W5.png}} &
{\includegraphics[width=0.2\textwidth]{images/T3_W9.png}} &
{\includegraphics[width=0.2\textwidth]{images/T3_W11.png}}&
{\includegraphics[width=0.2\textwidth]{images/T3_W15.png}} &\\
{\includegraphics[width = 0.6in]{T4.png}} &
{\includegraphics[width=0.2\textwidth]{images/T4_W5.png}} &
{\includegraphics[width=0.2\textwidth]{images/T4_W9.png}} &
{\includegraphics[width=0.2\textwidth]{images/T4_W11.png}}&
{\includegraphics[width=0.2\textwidth]{images/T4_W15.png}} &\\
{\includegraphics[width = 0.6in]{T5.png}} &
{\includegraphics[width=0.2\textwidth]{images/T5_W5.png}} &
{\includegraphics[width=0.2\textwidth]{images/T5_W9.png}} &
{\includegraphics[width=0.2\textwidth]{images/T5_W11.png}}&
{\includegraphics[width=0.2\textwidth]{images/T5_W15.png}} &\\

\end{tabular}
\caption{Input Images}

\end{figure*}


上述代码有效,但是有没有办法缩短它?还标记最左边的图像?在此处输入图片描述

答案1

看看以下 MWE 是否能帮助你:

编辑:

更简单的是使用tabularx表格环境tabular(因为它自己执行列宽计算)。现在 MWE 包含 5 x 5 网格图像。

\documentclass{ieeetran}
\usepackage[demo]{graphicx}
\usepackage{stfloats} % for positioning of figure* on the same page
\usepackage{tabularx}

\begin{document}
\begin{figure*}[b]
  \setkeys{Gin}{width=\\linewidth}
  \setlength\tabcolsep{3pt}
\begin{tabularx}{\linewidth}{@{} p{1em}p{0.5in} *{4}{X} @{}}
a)  & \includegraphics[height=0.5in]{T1.png}
    & \includegraphics{T2.png}
    & \includegraphics{T3.png}
    & \includegraphics{T4.png}
    & \includegraphics{T5.png}    \\
b)  & \includegraphics[height=0.5in]{T1.png}
    & \includegraphics{T2.png}
    & \includegraphics{T3.png}
    & \includegraphics{T4.png}
    & \includegraphics{T5.png}    \\
c)  & \includegraphics[height=0.5in]{T1.png}
    & \includegraphics{T2.png}
    & \includegraphics{T3.png}
    & \includegraphics{T4.png}
    & \includegraphics{T5.png}    \\
d)  & \includegraphics[height=0.5in]{T1.png}
    & \includegraphics{T2.png}
    & \includegraphics{T3.png}
    & \includegraphics{T4.png}
    & \includegraphics{T5.png}    \\
e)  & \includegraphics[height=0.5in]{T1.png}
    & \includegraphics{T2.png}
    & \includegraphics{T3.png}
    & \includegraphics{T4.png}
    & \includegraphics{T5.png}    \\
\end{tabularx}
\caption{Input Images}
\end{figure*}
\end{document}

在此处输入图片描述

(红线表示页面布局)

笔记: figure*只能放置在插入文本的下一页的顶部。stfloats如果有足够的空间,使用该包可以将图像放置在页面的底部。

相关内容