[Tex/LaTex] How to center multiple figures and their descriptions

graphicsminipagespacing

I am writing a paper for one of my classes on Catalan numbers. I have a section where I'm trying to include three different figures that I would like to be centered with their corresponding descriptions centered under them. I'm not very experienced at Latex and I realize this code is probably a mess, but I use the same method for other figures later in the paper and those line up fine. I have included a screenshot of what the pdf looks like after I run the Latex document. As you can see, the figures and their descriptions are all there, but the images are off center and I'm not sure why. I've tried messing with their scales in case that was the problem but that didn't solve it. I've also tried it without the \begin{center} and \end{center} at the start and end of the code but that didn't work either. If anyone has any suggestions about how to fix the problem or what the issue is, it would be much appreciated.

\begin{center}

\begin{minipage}{.4\textwidth}  
\includegraphics[scale=.5]{StaircaseWalk1x1.png}  
\captionof{figure}{1x1 Grid}  
\end{minipage}  
\hspace{1.2cm}  
\begin{minipage}{.4\textwidth}  
\includegraphics[scale=.5]{StaircaseWalk2x2.png}  
\captionof{figure}{2x2 Grid}  
\end{minipage}

\vspace{1.2cm}

\begin{minipage}{.4\textwidth}  
\includegraphics[scale=.65]{StaircaseWalk3x3.png}  
\captionof{figure}{3x3 Grid}  
\end{minipage}

\end{center}

Figures not aligned properly

Best Answer

Here is a way to do it with the floatrow package:

\documentclass[11pt,a4paper]{book}
\usepackage[utf8]{inputenc} %
\usepackage{geometry}
\usepackage{floatrow, graphicx, caption}

\begin{document}

\begin{figure}[!ht]
\floatsetup{style=plain, floatrowsep=qquad, heightadjust=object, valign=c, captionskip=2.5ex}
\captionsetup{justification=RaggedRight, labelfont=it, labelsep=endash}
\begin{floatrow}
\ffigbox[1.2\FBwidth]{\caption{Leonardo da Vinci: Lady with an Ermine}\label{vinci}}
{\includegraphics[scale = 0.8]{hermine}}
\ffigbox[\FBwidth]{\caption{Paolo Uccello: The battle of San Romano}\label{uccello}}
{\includegraphics[scale=0.8]{SanRomano}}
\end{floatrow}
\end{figure}

\end{document} 

enter image description here