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}

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}


\captionofcommand for captioning objects that are not a float. And lastly you just have too much text on a slide. – percusse Jan 20 at 9:31captionpackage and settingskip=0ptseem to do the work. It only looks like there is a big space between the caption and the table because the table text is smaller compared to the default font size. And, afaik, specifying!htbpdoes not work inbeamer. And as percusse has mentioned, instead of thetableenvironment, you might want to use the\captionofcommand instead. – hpesoj626 Jan 20 at 9:37figureandtableare no floating environments inbeamerI don't see the point why not using them. – Axel Sommerfeldt Jan 20 at 9:40