9

I would like to rotate mysidewaysfigure to face towards the left rather than the right (i.e. from 90 degreed to 270 degrees). Does anyone know how I can do this using the sidewaysfigure environment?

Here is my code:

\documentclass{article}
\usepackage{graphicx}
\usepackage[demo]{rotating}
%\usepackage[figuresleft]{rotating}
\begin{document}
\begin{sidewaysfigure}
    \centering
        \includegraphics[scale=0.6]{example-image-a}
    \caption{text here}
    \label{fig:mine}
\end{sidewaysfigure}
\end{document}
  • Just the image, or the caption as well? Do you want this globally, or just for a single image? – Werner Sep 15 '14 at 16:35
7

To have the bottom edge of the figures be placed on the left, load the rotating package with the option figuresleft. By the way, this option affects the orientation of sidewaysfigures and sidewaystables, not just of sidewaysfigures.

Incidentally, since the rotating package loads the graphicx package automatically, there's no need to load graphicx separately.


Addendum: If you want the orientation of the sidewaysfigure and sidewaystable environments to alternate between odd-numbered and even-numbered pages, do not specify either figuresleft or figuresright. Instead, use the document class option twoside -- or use a document class, such as book, that invokes the twoside option by default. That said, I suspect that your readers might strongly dislike having to crane their necks first to one side and then to the other to take in your figures. Better to stick with a single orientation...

  • thanks! this still hasn't really solved my problem though.. I want to do exactly what you said, have two images on two pages face the same direction (e.g. left and right page figures facing towards the right), but when I have a single image on it's own, I want it to face outward towards the left on the left page and vise vursa.. – user62544 Sep 15 '14 at 17:54
  • @Michael - If you want to go the route of having different orientations depending on whether there's a figure on both pages or on just one page of a two-page spread, what kind of information will you be supplying so that LaTeX can figure out which case applies? By the way, I still don't think your readers are going to appreciate having to crane their necks in one direction or another depending on whether there's a single sidewaysfigure on either the left-hand side or the right-hand side of a two-page layout. – Mico Sep 15 '14 at 18:47
3

Here you go

Code 1

\begin{figure}[h]
  \begin{sideways}
    \includegraphics[scale=0.2]{bear}
  \end{sideways}
  \centering
  \caption[Caption]{Bear}
  \label{pic:picture}
\end{figure}

Result 1

Code 2

\begin{figure}[htb]
  \centering
  \begin{turn}{-90}
  \begin{minipage}{3in}
  \centering
    \includegraphics[scale=0.2]{bear}
  \caption{Bear}
  \label{fig:bear}
  \end{minipage}
  \end{turn}
\end{figure}

Result 2

Sure you can mix and use what you want! Hope it helps

  • You can leave the caption out as in the first example. Do whatever you want but this should achieve what you need! – Odin Sep 15 '14 at 17:58
  • Thanks Odin! the image has now rotated fine, but the caption has not and is at the bottom of the page, even when using code 2. I exactly have the same code as code 2 in my document, except my scale = 0.6 and minipage = 0.8in. Before this, the image would be underneath some text on the following pages.. – user62548 Sep 15 '14 at 18:33
  • As you described it, it's a matter of scaling to fit. If you can share real code and image I would help you more but now hard to tell. – Odin Sep 15 '14 at 18:45
  • Also mined the specifiers in \begin{figure}. Here are what they exactly do. – Odin Sep 15 '14 at 18:47
3
\documentclass[a4paper]{article}
\usepackage{graphicx}
\usepackage{hvfloat}
\begin{document}

\hvFloat[objectAngle=90]{figure}{%
    \includegraphics[scale=0.6]{example-image-a}}%
    {text here}%
    {fig:mine}%

\hvFloat[objectAngle=90,capAngle=90,capPos=right]{figure}{%
    \includegraphics[scale=0.6]{example-image-a}}%
{text here}%
{fig:mine2}%

\end{document}

enter image description here

Not the answer you're looking for? Browse other questions tagged or ask your own question.