[Tex/LaTex] Space between table and caption in Beamer

beamercaptionsspacingtables

I am making a slide using Stockton beamer theme.

I have added a table to a frame, however as you can see in the screenshot, that space between caption and table is too much. I made some search and found these codes,

\usepackage{subfig}
\captionsetup[table]{belowskip=1pt,aboveskip=1pt}

\usepackage[font=small,skip=0pt]{caption}

enter image description here

However, they both are not working. How can I solve this problem? Table looks so bad in this slide.

\documentclass[xcolor=svgnames]{beamer} 
\usetheme{Stockton}

\usepackage{epsfig} %for figures
\usepackage{xcolor} %for color

\definecolor{hughesblue}{rgb}{.9,.9,1} %A blue I like to use for highlighting, matches Hughes Hallet's book

\logo{\includegraphics[height=2cm]{Seal_Cream.pdf}} % comment out this line if you do not have the pacific-seal file}

\title[Short Title \hspace{4em}\insertframenumber/
\inserttotalframenumber]{~ \\ Long Title:  A Sample Using \\ Stockton Beamer Theme \\~} 

\author[short author name or speaker]{ \\ Sarah Merz, The University of the Pacific } 

\date{January, 2010}

\begin{document}

\begin{frame}
\maketitle
\end{frame}


\begin{frame}
\frametitle{INPUT SELECTION}
\begin{itemize}
\item The load is influenced by many factors.:
\end{itemize}
\begin{table}[!htbp]
\caption {Factors that may influence electricity demand}
\label{table:1}
\resizebox{\linewidth}{!}{%
\begin{tabular}{|l|p{15cm}|}\hline
  Calendar data & hour of the day, day of the week, holidays, 'bridge days', daylight saving time, school holidays\\\hline
  Meteorological data & temperature, humidity, cloud cover, luminosity, earth's position in the eclipse, sun's altitude, wind speed, solar radiation, climate change\\\hline
  Economic data & GDP, per capita GDP, consumer price index, average salary earnings, production plans of companies, electricity price, industrial expansion\\\hline
  Demographic data & number of households, population growth, local area development\\\hline
\end{tabular}}
\end{table}
\begin{itemize}
\item The importance of horizon:
\begin{itemize}
\item For very short-term forecast (up to 6 hours) $\longrightarrow$ inputs based on past load values
\end{itemize}
\item Engineering judgment or human experience as well as some statistical/graphical analysis
\end{itemize}
\end{frame}

\end{document}

Best Answer

belowskip=0pt of caption package seems to do the job. Also, the table environment is adding whitespace between text and the table. You can use \captionof command instead.

Code

\documentclass[xcolor=svgnames]{beamer} 
\usetheme{Stockton}

\usepackage{epsfig} %for figures
\usepackage{xcolor} %for color

\definecolor{hughesblue}{rgb}{.9,.9,1} %A blue I like to use for highlighting, matches Hughes Hallet's book

%\logo{\includegraphics[height=2cm]{Seal_Cream.pdf}} % comment out this line if you do not have the pacific-seal file}

\title[Short Title \hspace{4em}\insertframenumber/
\inserttotalframenumber]{~ \\ Long Title:  A Sample Using \\ Stockton Beamer Theme \\~} 

\author[short author name or speaker]{Sarah Merz, The University of the Pacific } 

\date{January, 2010}

\usepackage{caption}
\captionsetup{skip=0pt,belowskip=0pt}

\begin{document}

\begin{frame}
\maketitle
\end{frame}


\begin{frame}
\frametitle{INPUT SELECTION}
\begin{itemize}
\item The load is influenced by many factors.:
\end{itemize}
%\begin{table}[!htbp]
\captionof{table}{Factors that may influence electricity demand\label{table:1}}
%\captionof{table}{Factors that may influence electricity demand}
%\label{table:1}
\resizebox{\linewidth}{!}{%
\begin{tabular}{|l|p{15cm}|}\hline
  Calendar data & hour of the day, day of the week, holidays, 'bridge days', daylight saving time, school holidays\\\hline
  Meteorological data & temperature, humidity, cloud cover, luminosity, earth's position in the eclipse, sun's altitude, wind speed, solar radiation, climate change\\\hline
  Economic data & GDP, per capita GDP, consumer price index, average salary earnings, production plans of companies, electricity price, industrial expansion\\\hline
  Demographic data & number of households, population growth, local area development\\\hline
\end{tabular}}
%\end{table}
\begin{itemize}
\item The importance of horizon:
\begin{itemize}
\item For very short-term forecast (up to 6 hours) $\longrightarrow$ inputs based on past load values
\end{itemize}
\item Engineering judgment or human experience as well as some statistical/graphical analysis
\end{itemize}
\end{frame}

\end{document}

Output

enter image description here