I am writing up my thesis and I have some subfigures. When I typeset the code, the subfigures are labelled (a) and (b), however when I refer to the subfigures in the text, I get Figure 4.1.1 and 4.1.2 instead of 4.1(a) and 4.1(b). How do I change the code to get 4.1(a) instead of 4.1.1 in the text? The code I am using for the figures is shown below:
\begin{figure}[!htbp]
\begin{subfigure}{\textwidth}
\begin{center}
\includegraphics[width=0.8\textwidth,valign=t]{figures/chapter4/1.pdf}
\phantomcaption
\label{fig:1}
\end{center}
\end{subfigure}
\begin{subfigure}{\textwidth}
\begin{center}
\includegraphics[width=0.8\textwidth, valign=t]{figures/chapter4/2.pdf}
\phantomcaption
\label{fig:2}
\end{center}
\end{subfigure}
\caption{Graphs showing..}
\label{fig:Demand}
\end{figure}
Thanks

valign=tdefined? – Mico Jul 26 '17 at 17:45\phantomcaptiondirectives, I don't see how it could generating captions labeled(a)and(b). Please clarify what's going on. – Mico Jul 26 '17 at 20:08