pacakge for subfigure latex code example
Example 1: subfigure latex
\begin{figure}
\centering
\begin{subfigure}[b]{0.3\textwidth}
\centering
\includegraphics[width=\textwidth]{first image}
\caption{first image}
\label{fig:ui1}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\textwidth}
\centering
\includegraphics[width=\textwidth]{third image}
\caption{third image}
\label{fig:ui3}
\end{subfigure}
\label{fig:three graphs}
\end{figure}
Example 2: how to include subfigure in latex
\usepackage{subcaption}
\begin{figure}[ht]
\begin{subfigure}{.5\textwidth}
\centering
% include first image
\includegraphics[width=.8\linewidth]{image_file_name}
\caption{Put your sub-caption here}
\label{fig:sub-first}
\end{subfigure}
\begin{subfigure}{.5\textwidth}
\centering
% include second image
\includegraphics[width=.8\linewidth]{image_file_name}
\caption{Put your sub-caption here}
\label{fig:sub-second}
\end{subfigure}
\caption{Put your caption here}
\label{fig:fig}
\end{figure}