I would like to add four figures into a single row but I am unable to do it. I tried a lot to figure out the error but still failed. At the moment, there is one figure on row 1, the second figure on row two, third figure and fourth figure are on row 4.
\begin{figure}
%\centering
%\hfill
\subfigure[Training loss]{\includegraphics[width=0.25\linewidth]{images/all_vits.pdf}}
%\vspace{-4pt}
%\hfill
\subfigure[Accuracy]{\includegraphics[width=0.25\linewidth]{images/acc_vit.pdf}}
%
%\vspace{-4pt}
%\hfill
%\caption{Comparison of pure ViTs and Convolutional ViTs %models.}
%\vspace{-13pt}
%\label{fig:ALLVITS}
%\end{figure}
%\begin{figure}
%\hfill
\subfigure[Training loss]{\includegraphics[width=0.25\linewidth]{images/ours_loss.pdf}}
%\vspace{-4pt}
%\hfill
\subfigure[Accuracy]{\includegraphics[width=0.25\linewidth]{images/ours_acc.pdf}}
%\vspace{-4pt}
%\hfill
%\caption{Comparison of our module integrates in O-PVT.}
\label{fig:OPVT}
\end{figure}

\subfigurein your code; comment them out or delete them – imnothere Apr 05 '22 at 02:15subfigurepackage is obsolete and you should use thesubfigpackage instead, see https://www.ctan.org/pkg/subfigure. – Dr. Manuel Kuehner Apr 05 '22 at 02:29