# How to place a multicolumn table above a multicolumn figure?

I have a table that spans two columns of a page. I have a figure that also spans two columns.

I tried adjusting the h, t and the * in different fashions, but I couldn't get it to work. The figure keeps appearing on a second page. The table must come before the figure and on the same page. I want the figure to be right below the table, not just on the bottom of the page.

I wish to place the table above the multicolumn figure like in this picture:

My table is formatted like this:

\begin{table*}[ht]
\end{table*}


My figure is formatting like this:

\begin{figure*}[b]
% There are three subfigures in this figure
\end{figure*}

-
You can make your table and figure nonfloating objects, using the H (= here and nowhere else) from the float package. Or put your tabular/\includegraphics in a center environment and use \captionof{figure/table}{…}from the caption package. –  Bernard Apr 4 '14 at 22:05
@Bernard H doesn't work with * –  David Carlisle Apr 4 '14 at 23:41
@David Carlisle: I hadn't noticed the star, and don't even know what it corresponds to. Could you explain in a few words? –  Bernard Apr 5 '14 at 0:21
@Bernard as shown in the image in the question: it is a full width float that spans over both columns (so "here" doesn't make sense, neither h nor H) –  David Carlisle Apr 5 '14 at 0:23

You can simply put the code together in one floating environment, and choose the captions appropriately by using captionof from the caption package.

% arara: pdflatex
\documentclass[twocolumn]{article}
\usepackage{lipsum}
\usepackage{caption}
\begin{document}

\begin{figure*}[!t]
\centering
Figure code goes here
\caption{Figure}
table code goes here
\captionof{table}{Table}
\end{figure*}
\lipsum
\lipsum

\end{document}

-
h doesn't really make sense with figure* –  egreg Apr 4 '14 at 22:16
@egreg thanks, I was thinking about that :) –  cmhughes Apr 4 '14 at 22:17
The table caption is appearing at the bottom of the table. I need it to be the title of the table. –  sphere Apr 4 '14 at 22:29
@sphere move it above the table code :) –  cmhughes Apr 4 '14 at 22:33
The danger of doing this is that that the table (as it is floating as a figure) can float out of sequence. –  David Carlisle Apr 4 '14 at 23:46

You should be able to go

\begin{table*}...\end{table*}
\begin{figure*}....\end{figure*}


(There is no h option for 2-column floats).

If you do that and they don't both appear on the same page then presumably that would invalidate some of the constraints on the number of floats, or of the proportion of the page that may be allocated by floats.

If you want to ignore those constraints (rather than re-set them). You can use ! as

\begin{table*}[!]...\end{table*}
\begin{figure*}[!]....\end{figure*}

-