[Tex/LaTex] Centering does not work within minipage

horizontal alignmentminipage

I cannot place my plot centered on the page. I tried the following code:

\begin{figure}[ht]
\begin{center}
\begin{minipage}{\columnwidth}
\includegraphics[width=5in]{plot1.pdf}
\end{minipage}
\begin{minipage}{\columnwidth}
\includegraphics[width=5in]{plot2.pdf}
\end{minipage}
\begin{minipage}{\columnwidth}
\includegraphics[width=5in]{plot3.pdf}
\end{minipage}
\caption{xxx} 
\end{center}
\end{figure}

enter image description here

As one can recognize, the plot is not centered. Waht should I do to get it centered?

Best Answer

The comments above tell you what to do, the reason that what you did did not do anything is that you were centering the minipages but they were full width already so centering (or flush left or right) does nothing as a full width box is already "centred".

Within the minipage the settings are restored closer to default page settings, so if you want to centre the image inside a minipage the \centering command needs to be inside each minipage. But here, you can simply delete the minipages and allow the outer \centering to affect the included graphics directly.