How can I center align the two subfigures and align the caption (a), (b) for the two figures like this?
Assume that the image sizes are unknown. (or probably I can input it manually)
I saw some previous posts relating to this but they used minipages which I couldn't apply successfuly to my subfigures.
\documentclass[journal]{IEEEtran}
\usepackage[]{subfig}
\usepackage{stfloats}
\usepackage{float}
\usepackage{graphicx}
\begin{document}
%
\begin{figure}[!t]
\centering
\subfloat[]{\includegraphics[width=0.25\linewidth, height=30pt]{example-image-a}
\label{fig_first_case}}
\hfil
\subfloat[]{\includegraphics[width=0.25\linewidth, height=60pt]{example-image-b}
\label{fig_second_case}}
\caption{Example of two figures. (a) The first figure. (b) The second figure}
\label{fig_subfig}
\end{figure}
%
\end{document}



Fig. 1instead ofFig. 1:? The caption style is not compatible with IEEEtran. – emnha Aug 31 '22 at 15:50Package caption Warning: Unknown document class (or package), standard defaults will be used. See the caption package documentation for explanation. Package caption Warning: \setcaptionsubtype without \DeclareCaptionSubType. This is not designed to work; you could try replacing thesubfig' package withsubcaption' to resolve this problem which occurred on input line 18. See the caption package documentation for explanation– emnha Aug 31 '22 at 16:02floatrowcooperates with thecaptionpackage . You might try\captionsetup{labelsep=none}. – Bernard Aug 31 '22 at 16:07