I would like to rotate an image (in LATEX) keeping it at the same location (I just want to rotate it) In order to do that I used \begin{sidewaysfigure}[H] but is not working.

The current output: The image appears on the last sheets

what's going on? any idea? I also changed the height/widht but it doesn't work either:

 \caption{Swimlane Diagram.}
  • 2
    From the package documentation of rotating: "two new environments, sidewaystable and sidewaysfigure, each of which produces a single page-size float with contents rotated ±90 degrees" Please clarify: Do you want to keep the rotated image on the same page as other unrotated content or do you want the image to be on a single page, but stay where it was used in the code?
    – leandriis
    Nov 13, 2019 at 16:22
  • 1
    Hard to say without seeing the image and an example document, but my guess is that \begin{figure}[H] ... \includegraphics[angle=90]{whatever} ... would achieve the result you need. Nov 13, 2019 at 16:31
  • I don't think sideways figure supports [H]. See tex.stackexchange.com/questions/262816/… and ignore the -90 version. Nov 13, 2019 at 16:50

2 Answers 2


You can save the figure + caption in a box and then rotate the box, or use the sidewaysfigure environment from the rotating package. It puts the figure on its own page. For a small figure you can use the \rotcaption command to rotate the caption.

enter image description here

enter image description here



Save the figure + caption in a box and rotate
            \caption{Swimlane Diagram}

Just rotate the caption
        \rotcaption{Just rotate caption}

Use the sidewaysfigure environment
    \caption{A sideways figure}


Taken from --https://tex.stackexchange.com/a/46337/197451


You can define the angle property in \includegraphics:

    \includegraphics[width=\textwidth, angle=90]{c.jpg}
  • 5
    keep in mind that this rotates the image from the corner, not from the center (which is more natural in my opinion). For the latter, add ,origin=c Mar 4, 2023 at 16:48
  • 1
    Works like a charm. Keep in mind, that after rotating width=\textwidth still references the original width of the figure, not the "new" width after rotating.
    – devbf
    Dec 14, 2023 at 6:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .