[Tex/LaTex] Adjusting figures of different size

graphicshorizontal alignmentsubfloats

I generated some figures using Matplotlib/Python.

I want to display them by lines and by columns/line.

This is my current code for the first case:

\begin{figure}[!htpb]
    \centering
    \subfloat[]{\includegraphics[width=5.3cm] {fig1}} \\
    \vspace{-10pt}
    \subfloat[]{\includegraphics[width=5.3cm] {fig2}} \\
    \vspace{-10pt}
    \subfloat[]{\includegraphics[width=5.3cm] {fig3}} \\        
\end{figure}

And this is the result:

enter image description here

It's possible to note that the last image is 'larger' than the others, because its scale has two instead of three numbers.

I'm thinking about an approach to handle this. I thought about putting all figures left aligned inside a minipage, trying different sizes, and this minipage inside a figure environment, but it didn't seem to handle the problem:

\begin{figure}[!htpb]
    \centering
    \begin{minipage}{\columnwidth}
        \subfloat[]{\includegraphics[width=5.3cm] {fig1}}   \\
        \vspace{-10pt}
        \subfloat[]{\includegraphics[width=5.3cm] {fig2}}    \\
        \vspace{-10pt}
        \subfloat[]{\includegraphics[width=5.3cm] {fig3}} \\        
    \end{minipage}
\end{figure}

Best Answer

In order to keep the "main" rectangle of each image the same size just scale each image by the same amount so

    \subfloat[]{\includegraphics[scale=0.25] {fig1}}   \\

not

    \subfloat[]{\includegraphics[width=5.3cm] {fig1}}   \\

Obviously the exact scale factor (0.25 here) will depend on your original image size, which I do not know, but if you specify it, rather then let latex calculate the scale, they will all scale by the same amount.