请问如何排版子图片中的子图?

发布于 2021-03-22 17:32:42

图.png
请问如何排版成图中的样子?

\begin{figure*}[htp]
    
    \centering
    \subfloat[获得的解集]{
        \includegraphics[width=0.2\textwidth]{a1.eps}
        \includegraphics[width=0.2\textwidth]{a1.eps}    
        \includegraphics[width=0.2\textwidth]{a1.eps}
        \includegraphics[width=0.2\textwidth]{a1.eps}
        \includegraphics[width=0.2\textwidth]{a1.eps}
        \label{fig:C33DTLZ1}
    }
    
    
    \centering
    \subfloat[获得的解集]{
        \includegraphics[width=0.2\textwidth]{a1.eps}
        \includegraphics[width=0.2\textwidth]{a1.eps}    
        \includegraphics[width=0.2\textwidth]{a1.eps}
        \includegraphics[width=0.2\textwidth]{a1.eps}
        \includegraphics[width=0.2\textwidth]{a1.eps}
        \label{fig:C33DILZ5}
    }

    \centering
    \subfloat[获得的解集]{
        \includegraphics[width=0.2\textwidth]{a1.eps}
        \includegraphics[width=0.2\textwidth]{a1.eps}    
        \includegraphics[width=0.2\textwidth]{a1.eps}
        \includegraphics[width=0.2\textwidth]{a1.eps}
        \includegraphics[width=0.2\textwidth]{a1.eps}
        \label{fig:C33DTLZ7}
    }        
    ~\\~\\
    \caption{PF解集}
    \label{fig:C3PF图形对比}

查看更多

关注者
0
被浏览
380
2 个回答
LaTeXStudio
LaTeXStudio 2021-03-22

代码如下:

\documentclass{article}
\usepackage{subfig}
\usepackage{graphicx}

\begin{document}
\begin{figure}
\centering
  \subfloat[caption fig (a).]{\parbox{\textwidth}{\centering\includegraphics[width=2cm]{example-image-a}\hskip1cm\includegraphics[width=2cm]{example-image-a}\\
\includegraphics[width=2cm]{example-image-a}\hskip1cm\includegraphics[width=2cm]{example-image-a}\hskip1cm\includegraphics[width=2cm]{example-image-a}}}

 \subfloat[caption fig (b).]{\parbox{\textwidth}{\centering\includegraphics[width=2cm]{example-image-a}\hskip1cm\includegraphics[width=2cm]{example-image-a}\\
\includegraphics[width=2cm]{example-image-a}\hskip1cm\includegraphics[width=2cm]{example-image-a}\hskip1cm\includegraphics[width=2cm]{example-image-a}}}

   \caption{caption fig.}\label{fig:}
\end{figure}
\end{document}

效果图如下:
image.png

我喜欢简单直接。我不喜欢 subfigsubfigure,我喜欢 subcaption

\documentclass{ctexart}
\usepackage{subcaption,graphicx}
\begin{document}
\begin{figure}
\begin{subfigure}{\linewidth}
\mbox{}\hfill%
\includegraphics[width=0.3\linewidth]{example-image-a.pdf}\hfill
\includegraphics[width=0.3\linewidth]{example-image-b.pdf}\hfill
\mbox{}\\[5mm]
\includegraphics[width=0.3\linewidth]{example-image-a.pdf}\hfill
\includegraphics[width=0.3\linewidth]{example-image-b.pdf}\hfill
\includegraphics[width=0.3\linewidth]{example-image-c.pdf}
\caption{子图1}
\end{subfigure}
\begin{subfigure}{\linewidth}
\mbox{}\hfill%
\includegraphics[width=0.3\linewidth]{example-image-a.pdf}\hfill
\includegraphics[width=0.3\linewidth]{example-image-b.pdf}\hfill
\mbox{}\\[5mm]
\includegraphics[width=0.3\linewidth]{example-image-a.pdf}\hfill
\includegraphics[width=0.3\linewidth]{example-image-b.pdf}\hfill
\includegraphics[width=0.3\linewidth]{example-image-c.pdf}
\caption{子图2}
\end{subfigure}
\caption{图示}
\end{figure}
\end{document}

效果:
image.png

撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友

手机
浏览

扫码手机浏览