How to reduce space between image and its caption?

You can do it with caption package. The space between the caption and the figure is called skip (default is 10pt).

\documentclass{article}
\usepackage[demo]{graphicx} %% Remove [demo] in your file
%\usepackage{caption}
%\captionsetup[table]{font=small,skip=0pt}     %% Adjust here
%or equivalently 
\usepackage[font=small,skip=0pt]{caption}

\begin{document}

  Some text...

  \begin{figure}[htb]
  \begin{center}
  \includegraphics[height=1in,width=1in,angle=-90]{foo}
  \caption{This is a figure.}
  \end{center}
  \end{figure}

   More text...

  \begin{table}[htb]
  \centering
  \caption{This is a table.}
  \begin{tabular}{|c|c|}
    \hline
    % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...
    1 & 2 \\
    4 & 7 \\
    \hline
  \end{tabular}
  \end{table}

     More text...

  \end{document}

enter image description here

Please note that \captionsetup{font=small,skip=0pt} affects both tables and figures. If you want it separately, you may use:

 \captionsetup[table]{font=small,skip=0pt}

for tables only or

\captionsetup[figure]{font=small,skip=0pt}

for figures only.


For locally change the caption position you can also use a negative value on the setting. For example, when the figure has larger white part, e.g use \vspace{-1cm}, instead of changing the figure itself.


A brute force \vspace{1pt} just before the caption, inside any figure, also works if one wants to change spacings locally.