0

When I changed subfigure to sub float, another figure of my template gave errors.

\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*}

enter image description here

Please help me to resolve this issue. I want 4 subplots a,b,c and d

1
  • 1
    Please (i) inform us what error you receive at compilation (ii) always provide complete small document beginning with \documentclass{...} and ending with \end{document}, which reproduce your problem.
    – Zarko
    May 8, 2020 at 9:42

1 Answer 1

1

I suspect, that you looking for the following:

enter image description here

Your code fragment did not get any error, however, images are nod arranged as you expected. For the new row of images ( (c) and (d) ) you should insert empty line before it:

\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}
1
  • Thanks a lot. It worked. May 8, 2020 at 15:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .