[Tex/LaTex] Latex figure numbering as part a,b,c


I am writing an article and I have to display figures side by side. I used the commands from the following link How to order 3 images horizontally? to do that. However, the figures are numbered in sequence, eg. Figure 1, Figure 2 Figure 3. I would like all of them to be part of same figure 1 and have subsections as (a) , (b) and (c).

Best Answer

You could also use the subcaption package and its subfigure environment. The following example sets up the subfigures so that they occupy the full width of the textblock. It also assumes that the graphs associated with each subfigure are all equally wide; if that's not the case, simply adjust the widths of the subfigures appropriately.

enter image description here

\usepackage[demo]{graphicx} % omit 'demo' for real document


    \caption{First subfigure} \label{fig:1a}
  \hspace*{\fill}   % maximize separation between the subfigures
    \caption{Second subfigure} \label{fig:1b}
  \hspace*{\fill}   % maximizeseparation between the subfigures
    \caption{Third subfigure} \label{fig:1c}

\caption{A figure that contains three subfigures} \label{fig:1}