[Tex/LaTex] turn a sidewaystable into a figure

floatsrotating

I'm hoping I can get a quick answer to this question, and I don't have time to make a MWE right now. If I have made a sideways table and used it to layout some images nicely, but I would like the overall table to actually be a figure so that it:

  1. is titled "Figure xx",
  2. shows up in the LOF,
  3. counts towards the figure counter, and
  4. no longer counts towards table sum or LOT.

Can this be easily done?

Here's a rough code snippet to show what I mean. I'd like to do something equivalent to taking the following:

\begin{sidewaystable}[htpb]
\begin{tabular}
... table contents ... 
\end{tabular}
\end{sidewaystable}

and turning it into:

\begin{figure}
\begin{sidewaystable}
\begin{tabular}
... table contents ... 
\end{tabular}
\end{sidewaystable}
\end{figure}

However, just wrapping the table in a figure environment like that gives me errors right away at \begin{sidewaystable} saying it's "not in outer par mode." I also think that even if this did compile, it would simultaneously increment table AND figure counters.

Best Answer

Use the sidewaysfigure environment instead of sidewaystable:

\documentclass{article}
\usepackage{rotating}

\begin{document}
\listoffigures
\begin{sidewaysfigure}
\centering
\rule{3cm}{3cm}
\caption{test rotated figure}
\label{fig:test}
\end{sidewaysfigure}
\end{document}