将图像排列为表格或子图或其他布局

将图像排列为表格或子图或其他布局

如何像附图一样布局图像?我应该将它们排列为表格、子图还是其他布局?谢谢。

在此处输入图片描述

这是我的乳胶代码:

\begin{figure}
\centering
\subfloat[]{\includegraphics[width=\dimexpr(\textwidth-15pt+3pt*2)/2\relax]{fish}}%
\hfill
\subfloat[]{\vbox{\offinterlineskip\halign{#\hskip3pt&#\cr
  \includegraphics[width=\dimexpr(\textwidth-15pt-3pt*2)/4\relax]{fish}&
  \includegraphics[width=\dimexpr(\textwidth-15pt-3pt*2)/4\relax]{fish}\cr
  \noalign{\vskip3pt}
  \includegraphics[width=\dimexpr(\textwidth-15pt-3pt*2)/4\relax]{fish}&
  \includegraphics[width=\dimexpr(\textwidth-15pt-3pt*2)/4\relax]{fish}\cr
  }}}

\subfloat[]{\vbox{\offinterlineskip\halign{#\hskip3pt&#\cr
  \includegraphics[width=\dimexpr(\textwidth-15pt-3pt*2)/4\relax]{fish}\cr
  \noalign{\vskip3pt}
  \includegraphics[width=\dimexpr(\textwidth-15pt-3pt*2)/4\relax]{fish}\cr
  }}}

\subfloat[]{\vbox{\offinterlineskip\halign{#\hskip3pt&#\cr
  \includegraphics[width=\dimexpr(\textwidth-15pt-3pt*2)/4\relax]{fish}\cr
  \noalign{\vskip3pt}
  \includegraphics[width=\dimexpr(\textwidth-15pt-3pt*2)/4\relax]{fish}\cr
  }}}

\caption{Test images}
\end{figure}

结果是:

在此处输入图片描述

如何将“(d)”放在“(c)”的右边?

更新: 感谢 Johannes_B,subcaption 是满足我要求的最简单方法。我的代码是:

 \begin{figure}
    \begin{subfigure}[b]{.237\textwidth}
        \centering
        \includegraphics[width=\textwidth]{image_a}
        \caption{Our}\label{fig:1a}
    \end{subfigure}
    \hfill    
    \begin{subfigure}[b]{.237\textwidth}
        \centering
        \includegraphics[width=\textwidth]{image_b}
        \caption{Adaptive order selection}\label{fig:1b}
    \end{subfigure}
    \hfill    
    \begin{subfigure}[b]{.15\textwidth}
        \centering
        \includegraphics[width=\textwidth]{image_c_1}
        \includegraphics[width=\textwidth]{image_c_2}
        \caption{Another subfigure}\label{fig:1c}
    \end{subfigure}
    \hfill
    \begin{subfigure}[b]{.15\textwidth}
        \centering
        \includegraphics[width=\textwidth]{image_d_1}
        \includegraphics[width=\textwidth]{image_d_2}
        \caption{Another subfigure}\label{fig:1c}
    \end{subfigure}
    \hfill
    \begin{subfigure}[b]{.15\textwidth}
        \centering
        \includegraphics[width=\textwidth]{image_e_1}
        \includegraphics[width=\textwidth]{image_e_2}
        \caption{Another subfigure}\label{fig:1c}
    \end{subfigure}
    \hfill
\caption{A figure}\label{fig:1}
\end{figure}

答案1

您几乎做到了...不幸的是,我没有那么好的数字来将它们包含在下面的 MWE 中:

在此处输入图片描述

\documentclass{article}
\usepackage{graphicx}
\usepackage{caption,subcaption}

\begin{document}
\begin{figure}[ht]
  \centering
\begin{subfigure}[b]{0.5\linewidth}
    \centering
\includegraphics[width=0.95\textwidth]{example-image-a}
    \caption{}\label{fig:fig1}
\end{subfigure}%
\begin{subfigure}[b]{0.5\linewidth}
    \centering
\includegraphics[width=0.45\textwidth]{example-image-a}
    \hfil
\includegraphics[width=0.45\textwidth]{example-image-b}\\[2mm]
\includegraphics[width=0.45\textwidth]{example-image-c}
    \hfil
\includegraphics[width=0.45\textwidth]{example-image}
    \caption{}\label{fig:fig2}
  \end{subfigure}   

\vspace{1ex}
\begin{subfigure}[b]{0.32\linewidth}
    \centering
\includegraphics[width=0.48\textwidth]{example-image-a}
\includegraphics[width=0.48\textwidth]{example-image-b}
    \caption{}\label{fig:fig3}
\end{subfigure}\hfill%
\begin{subfigure}[b]{0.32\linewidth}
    \centering
\includegraphics[width=0.48\textwidth]{example-image-a}
\includegraphics[width=0.48\textwidth]{example-image-b}
    \caption{}\label{fig:fig4}
  \end{subfigure}\hfill%
\begin{subfigure}[b]{0.32\linewidth}
    \centering
\includegraphics[width=0.48\textwidth]{example-image-a}
\includegraphics[width=0.48\textwidth]{example-image-b}
    \caption{}\label{fig:fig5}
  \end{subfigure}
\caption{Test images}
\end{figure}
\end{document}

可能需要对图形的宽度和高度进行一些手动调整,以便能够按照您喜欢的方式显示。

相关内容