[Tex/LaTex] Add space between two images

graphicsspacing

Hello I want add space between two images like this:

\begin{figure}
    \includegraphics[width=\textwidth]{test1.png}
    \vspace{2cm}
    \includegraphics[width=\textwidth]{test2.png}
    \caption{ActionButton}
    \label{ActionButton}
\end{figure}

but it's add space between test2.png and the caption…

How can I solve it?

Best Answer

I hope that this is the one you want

code

\documentclass{article}
\usepackage{graphicx}
\begin{document}


\begin{figure}
\begin{center}
    \includegraphics[width=0.35\textwidth]{albt.png}

    \vspace{1cm}

    \includegraphics[width=0.35\textwidth]{altman.png}
   \vspace{0.1cm}
    \caption{ActionButton}
    \label{ActionButton}
  \end{center}
\end{figure}


\end{document}

space