当我改为subfigure
子浮点数时,我的模板的另一个图形出现错误。
\begin{figure*}
\centering
\subfloat[]{\includegraphics[width=0.49\textwidth,height=0.16\textwidth]{pdf_plots/low_10.pdf}}\hfil
\subfloat[]{\includegraphics[width=0.49\textwidth,height=0.16\textwidth]{pdf_plots/full_10.pdf}}
\subfloat[]{\includegraphics[width=0.49\textwidth,height=0.16\textwidth]{pdf_plots/low_50.pdf}}\hfil
\subfloat[]{\includegraphics[width=0.49textwidth,height=0.16\textwidth]{pdf_plots/full_50.pdf}}
\caption{abcd}\label{fig:abcd}
\end{figure*}
请帮我解决这个问题。我想要 4 个子图 a、b、c 和 d
答案1
我怀疑您正在寻找以下内容:
您的代码片段没有出现任何错误,但是,图像的排列方式与您预期的一致。对于新行图像( (c) 和 (d) ),您应该在其前面插入空行:
\documentclass[journal]{IEEEtran}
\usepackage{graphicx}
\usepackage{subfig} % for subfloat environments
\usepackage{caption}
\begin{document}
\begin{figure*}
\centering
\setkeys{Gin}{width=0.48\linewidth,height=0.16\linewidth} % common settings for all images sizes
\subfloat[]
{
\includegraphics{example-image-duck} %{pdf_plots/low_10.pdf}
}
\hfil
\subfloat[]
{
\includegraphics{example-image-duck} %{pdf_plots/full_10.pdf}
}
\subfloat[]
{
\includegraphics{example-image-duck} %{pdf_plots/low_50.pdf}
}
\hfil
\subfloat[]
{
\includegraphics{example-image-duck} %{pdf_plots/full_50.pdf}
}
\caption{abcd}
\label{fig:abcd}
\end{figure*}
\end{document}