I gather that the figure
should be at the very top of a page, to be followed immediately by the table
environment. (Moreover, I'm taking for granted that the two environments will actually fit on a single page, right?)
You could achieve these objectives by loading the afterpage
package and "encasing" the figure
and table
environments in an \afterpage{...}
statement, as is shown in the following code fragment:
\afterpage{% % defer execution until the next page break occurs anyway
\begin{figure}[t!] % not "pt"
\centering
% remaining contents of figure environment
\end{figure}
\begin{table}[h!] % not t or b or p
\centering
% remaining contents of table environment
\end{table}
} % end of argument of `\afterpage` command
I'm further assuming that there are no deferred figure and/or table environments already waiting to be typeset. If that were the case, you should issue a \clearpage
instruction as the very first item in the argument of the \afterpage
command. (Even if there are no accumulated deferred floats to take care of, there's no harm done by issuing a \clearpage
instruction anyway at the start of the \afterpage
material; it would simply be ignored by TeX.)
In addition, if the figure and table environments combined take up most of the page (say, more than 75% of the page), you may also want to issue a second \clearpage
instruction, following the end of the table
environment. This will tell LaTeX that you want to have just those two floats on the page in question.
A float environment is hardly warranted here, since you seem to require a specific location for your tabular
environment. Why not just do the following?
See this for more details on what floats are used for.

\documentclass{article}
\usepackage{caption}
\usepackage{lipsum}
\begin{document}
\section{Foobar}
Please refer to Table~\ref{fig:mytable} for more details.
\lipsum[1]
\vspace*{\fill}
{
\centering
\begin{tabular}{c|c|c|c}
28 & 1 & (1)(28) & 28 \\
27 & 0 & (0)(27) & 0 \\
26 & 1 & (1)(26) & 26 \\
25 & 2 & (2)(25) & 50 \\
24 & 3 & (3)(24) & 72 \\
\end{tabular}
\captionof{table}{A magnificent table}
\label{fig:mytable}
}
\vspace*{\fill}
\clearpage
\end{document}
Best Answer
You can use the package
rotating
, which provides the environmentsidewaystable
. Your code should look as follows. Notice that the table takes one whole page (page 2). There is analogous environmentsidewaysfigure
.