Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to insert figure sideways in LaTeX

📅 2014-Nov-11 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ figure, latex, rotation ⬩ 📚 Archive

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


© 2023 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 Mastodon📧 Email