How to insert figure sideways in LaTeX

In a LaTeX document, you might sometimes want to insert an image sideways, rotated by 90 degrees, along with its caption. For example, consider this figure:

\begin{figure}
\centering
\includegraphics[scale=0.8]{foo.png}
\caption{This is a figure of Foo.}
\label{fig:foo}
\end{figure}

You can use the rotating package to insert this image sideways in the page. The same figure as above inserted sideways:

\usepackage{rotating}

\begin{sidewaysfigure}
\centering
\includegraphics[scale=0.8]{foo.png}
\caption{This is a figure of Foo.}
\label{fig:foo}
\end{sidewaysfigure}

Tried with: Ubuntu 14.04

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s