1
\documentclass[journal]{IEEEtran}
\usepackage[classicReIm]{kpfonts}
\usepackage{booktabs,tabularx,lipsum
\begin{document}

\begin{figure}[H]
    \centering

    \subfigure [\ RBM-based load forecast] {\includegraphics[width=7.5cm, keepaspectratio]{F_Load.eps} \label{fig1:subfig1}}
    \subfigure [\ RBM-based RTPS forecast] {\includegraphics[width=7.5cm, keepaspectratio]{F_RTPS.eps} \label{fig1:subfig2}} %\vspace{-6pt}
    \subfigure [\ RBM-based CPPS forecast] {\includegraphics[width=7.5cm, keepaspectratio]{F_CPPS.eps} \label{fig1:subfig2}} %\vspace{-6pt}

    \caption[]{Price incentive-based DR schemes.}

    \label{fig1}
\end{figure}
\end{document}
2
  • 2
    One thing is that \usepackage{booktabs,tabularx,lipsum misses a closing }. If you use \usepackage{booktabs,tabularx,lipsum,float,subfigure,graphicx} probably the errors will go away but subfigure is said to deprecated.
    – user121799
    Apr 16, 2019 at 16:08
  • 2
    Well, which error do you get? Please make sure that your given code results in the error you get! At the moment that it is impossible, because you missed a closing } and some package calls ... Why did you tag with sidewaysfigure?
    – Mensch
    Apr 16, 2019 at 16:38

3 Answers 3

1

Several packages are missing:

  • float to use [H]
  • graphicx to include images
  • subfigure for the \subfigure macro

multiple use of same label is also bad and missing } in preamble

\documentclass[journal]{IEEEtran}
\usepackage[classicReIm]{kpfonts}
\usepackage{booktabs,tabularx,lipsum}
\usepackage{float}
\usepackage{graphicx}
\usepackage{subfigure}
\begin{document}
\begin{figure}[H]
    \centering
    \subfigure[RBM-based load forecast]{\includegraphics[width=7.5cm, keepaspectratio]{example-image}\label{fig1:subfig1}}
    \subfigure[RBM-based RTPS forecast] {\includegraphics[width=7.5cm, keepaspectratio]{example-image} \label{fig1:subfig2}} %\vspace{-6pt}
    \subfigure[RBM-based CPPS forecast] {\includegraphics[width=7.5cm, keepaspectratio]{example-image} \label{fig1:subfig3}} %\vspace{-6pt}
    \caption[]{Price incentive-based DR schemes.}
    \label{fig1}
\end{figure}
\end{document}

enter image description here

0
1

In your given code there are several issues:

  1. You have a missing } in your line \usepackage{booktabs,tabularx,lipsum .
  2. Related to your issue with a figure you need not to call booktabs and tabularx.
  3. You need to load package float to be able to use [H]. We need to load package graphicx with package option draft to be able to use your used filenames for the used images.
  4. A blank line inside figure results in starting a new paragraph. You have too much blank lines in your figure environment, delete all of them. To get the three subfigures above each other you need a blank line between subfigures one and two and a blank line between subfigures two and three.
  5. Instead the outdated package subfigure use subcaption or subfig. Please see that both call package caption which results in an warning. To avoid this simply do not use a package for subfigures, use only figures. For the following example I used subfig.
  6. Use better labels for you figure (and tables and ...). Better is \label{fig:<name>}, so you can better remember and can use the same name for a table, a chapter, etc. if you use a leading fig: or tab: or cha: or ...
  7. To be able to check if your used figure fits the column I used package showframe to visualize the typing area and margins only for this mwe.

Please have a look to this code:

\documentclass[journal]{IEEEtran}

\usepackage[classicReIm]{kpfonts}

\usepackage{lipsum}
\usepackage{subfig} % <=================================================
\usepackage[draft]{graphicx} % <========================================
\usepackage{float} % <==================================================
\usepackage{showframe}


\begin{document}

\begin{figure}%[H]
  \centering
  \subfloat[RBM-based load forecast\label{fig:subfig1}]{\includegraphics[width=7.2cm, keepaspectratio]{F_Load.eps}}

  \subfloat[RBM-based RTPS forecast\label{fig:subfig2}]{\includegraphics[width=7.2cm, keepaspectratio]{F_RTPS.eps}}

  \subfloat[RBM-based CPPS forecast\label{fig:subfig3}]{\includegraphics[width=7.2cm, keepaspectratio]{F_CPPS.eps}}
  \caption{Price incentive-based DR schemes.}
  \label{fig:figure1}
\end{figure}
\lipsum

Text see subfigures~\ref{fig:subfig1} and~\ref{fig:subfig3}.
\end{document}

and its result:

resulting page

Please note that I had to correct your used width for the images from 7.5cm to width=7.2cm to get all three subfigures fitting one complete column ...

I guess the error message you got was floating too large ...

1

You're missing the appropriate package for subfloats.

You cannot use subcaption, because caption is incompatible with IEEEtran. The subfigure package is obsolete. The only choice is therefore subfig, with the caption=false option so the incompatible caption will not be loaded.

Instead of explicit width of 7.5cm I used 0.9\columnwidth; note that keepaspectratio is not needed. It might make sense to use \columnwidth.

I also added a trick for making the float to fill the column, but it depends on the final height of the images.

\documentclass[journal]{IEEEtran}
\usepackage[classicReIm]{kpfonts}
\usepackage{booktabs,tabularx,graphicx}

\usepackage[caption=false]{subfig}

\usepackage{lipsum}

\begin{document}

\lipsum[1-3]

\begin{figure}
\centering

\subfloat[RBM-based load forecast]{%
  \includegraphics[width=0.9\columnwidth]{example-image}\label{fig1:subfig1}%
}

\subfloat[RBM-based RTPS forecast]{%
  \includegraphics[width=0.9\columnwidth]{example-image}\label{fig1:subfig2}%
}

\subfloat[RBM-based CPPS forecast]{%
  \includegraphics[width=0.9\columnwidth]{example-image}\label{fig1:subfig3}%
}

\caption{Price incentive-based DR schemes.}\label{fig1}
\end{figure}

\lipsum[4-5]

\begin{figure}

\sbox0{\small Fg}

\begin{minipage}[t][\dimexpr\textheight-\ht0][s]{\columnwidth}
\centering

\subfloat[RBM-based load forecast]{%
  \includegraphics[width=0.9\columnwidth]{example-image}\label{fig1:subfig1-m}%
}

\vfill

\subfloat[RBM-based RTPS forecast]{%
  \includegraphics[width=0.9\columnwidth]{example-image}\label{fig1:subfig2-m}%
}

\vfill

\subfloat[RBM-based CPPS forecast]{%
  \includegraphics[width=0.9\columnwidth]{example-image}\label{fig1:subfig3-m}%
}

\caption{Price incentive-based DR schemes.}\label{fig1-m}

\vspace{-\dp0}

\end{minipage}
\end{figure}

\lipsum

\end{document}

enter image description here

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.