请问如何排版成图中的样子?
\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图形对比}
代码如下:
\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}
效果图如下:
我喜欢简单直接。我不喜欢 subfig
、subfigure
,我喜欢 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}
效果: