[Tex/LaTex] subfloat vertical alignment

subfloats

I am having a problem aligning figures in a subfloat. Here is the raw code:

\begin{figure}
\centering 
\subfloat[]{{\includegraphics[width=.48\textwidth]{image1.pdf} }\label{}}%
\newline
\subfloat[]{{\includegraphics[width=.48\textwidth]{image2.pdf} }\label{}}%
\newline
\subfloat[]{{\includegraphics[width=.98\textwidth]{image3.pdf} }\label{}}%
\caption{}
\label{}
\end{figure}

I would expect the labels (a), (b) and (c) to be on the centreline of the page. The code gives no errors, but images 1 and 2 are not in the centerline of the page (i.e. their labels (a) and (b) are offset to the left).

I have read this might be something to do with using the width command but I am not sure how to fix it.

Thanks

Best Answer

better than use \\ instead of the \newline, is to insert blank line:

\documentclass{article}
\usepackage[demo]{graphicx} % in real document remove option"demo"
\usepackage{subfig}

\begin{document}
    \begin{figure}
\centering
\subfloat[]{{\includegraphics[width=.48\textwidth]{image1.pdf} }\label{fig:mycaption-a}}

\subfloat[]{{\includegraphics[width=.48\textwidth]{image2.pdf} }\label{fig:mycaption-a}}

\subfloat[]{{\includegraphics[width=.98\textwidth]{image3.pdf} }\label{fig:mycaption-c}}
\caption{My caption}
\label{fit:mycaption}
    \end{figure}
\end{document}

enter image description here