[Tex/LaTex] caption not centered for subfigure

horizontal alignmentsubcaptionsubfloats

I have three plots which I want to display one after the other. It displays fine but the only problem I have is the captions are not centered. the subcaptions are more obvious after rendering the picture below.

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{subcaption}

\begin{document}
\begin{figure*}

   \hspace*{-1.1in}
    \begin{subfigure}[b]{\textwidth}
        \centering
        \includegraphics[scale=0.37]{dummy.jpg}
        \caption{\small a image }    
        \label{fig:subfigure1}
    \end{subfigure}
    \vskip\baselineskip
    \hspace*{-1.1in}
    \begin{subfigure}[b]{\textwidth}  
        \centering 
        \includegraphics[scale=0.37]{dummy.jpg}
        \caption[]%
        {{\small b image}}    
        \label{fig:subfigure2}
    \end{subfigure}
    \vskip\baselineskip
    \hspace*{-1.1in}
    \begin{subfigure}[b]{\textwidth}   
        \centering 
        \includegraphics[scale=0.37]{dummy.jpg}
        \caption[]%
        {{\small c image}}    
        \label{fig:subfigure3}
    \end{subfigure}

    \caption[ whole image caption here]
    {\small whole image caption here} 
    \label{fig:experiments}
\end{figure*}

\end{document}

I am adding the image because it is extra wide, it is what I am using as a test

dummy.jpg

https://i.stack.imgur.com/5wjJ6.jpg

Best Answer

As @cfr has already pointed out in a comment, you should replace the three [scale=0.37] options with [width=\textwidth]. Omit the three redundant \centering instructions and replace both instances of \vskip\baselineskip\hspace*{-1.1in} with \vspace{1\baselineskip}. Finally, run the instruction \captionsetup{font=small} to save yourself from having to insert \small in the body of each and every \caption instruction.

enter image description here

\documentclass[demo]{article} % omit 'demo' option in real document

\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{subcaption}

\begin{document}
\begin{figure*}
\captionsetup{font=small} % font size for caption and subcaptions
    \begin{subfigure}[b]{\textwidth}
        \includegraphics[width=\textwidth]{dummy.jpg}
        \caption{a image }    
        \label{fig:subfigure1}
    \end{subfigure}

    \medskip
    \begin{subfigure}[b]{\textwidth}  
        \includegraphics[width=\textwidth]{dummy.jpg}
        \caption{b image}  
        \label{fig:subfigure2}
    \end{subfigure}

    \medskip
    \begin{subfigure}[b]{\textwidth}   
        \includegraphics[width=\textwidth]{dummy.jpg}
        \caption{c image}
        \label{fig:subfigure3}
    \end{subfigure}

    \caption[whole image caption here]{whole image caption here} 
    \label{fig:experiments}
\end{figure*}

\end{document}