[Tex/LaTex] vertical space between figures in one column

floatsgraphicsspacing

I want to merge 3 images into one figure in one column. How can I control the vertical space between figures? I want to have no space or negative space (overlap) between the figures.

Note: I want different amount of space between figures. For example no space between 1st and 2nd image and 1cm space between 2nd and 3rd image. And tabular is not necessary.

Code I am using

\documentclass[a4paper,12pt]{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}[htb]
\centering
  \begin{tabular}{@{}c@{}}
    \includegraphics[width=.5\textwidth]{example-image} \\
    \includegraphics[width=.5\textwidth]{example-image} \\
    \includegraphics[width=.2\textwidth]{example-image}
  \end{tabular}
\end{figure}
\end{document}

Best Answer

enter image description here

\documentclass[a4paper,12pt]{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}[htbp]
\centering
 \setlength\lineskip{0pt}

    \includegraphics[width=.5\textwidth]{example-image}

    \includegraphics[width=.5\textwidth]{example-image}

    \includegraphics[width=.2\textwidth]{example-image}

\end{figure}
\end{document}