[Tex/LaTex] How to rotate the page and have two figures side-by-side

floatsgraphicsrotating

I would like to dedicate a whole page to two figures, which I wish to place side by side in the horizontal layout.

What is the best way to achieve this? Thanks in advance!

This is what I have already tried:

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{caption}
\usepackage{subcaption}

\begin{document}

\begin{turn}{90}
\begin{minipage}{\textheight}

\begin{figure}
\centering
\begin{subfigure}
  \centering
  \includegraphics[width=5]{image1}
\end{subfigure}

\begin{subfigure}
  \centering
  \includegraphics[width=5]{image1}
  \caption{A subfigure}
  \label{fig:sub2}
\end{subfigure}
\end{figure}

\end{minipage}
\end{turn}

\end{document}

However, I am getting error messages which unfortunately I don't understand.

Best Answer

You like to have landscape oriented figure? Something like following figure? enter image description here

It is obtained with following MWE:

\documentclass{article}
    \usepackage{graphicx}
    \usepackage{caption}
    \usepackage{subcaption}

    \usepackage{rotating}% for sidewaysfigure

    \begin{document}
\begin{sidewaysfigure}
\begin{subfigure}{0.5\hsize}\centering
    \includegraphics[width=0.9\hsize]{example-image-a}
\caption{Sub figure A}
    \label{fig:sub1}
\end{subfigure}%
%\hfill <-- it is superfluous 
\begin{subfigure}{0.5\hsize}\centering
    \includegraphics[width=0.9\hsize]{example-image-b}
\caption{Sub figure B}
    \label{fig:sub2}
\end{subfigure}
\caption{Figure in landscape orientation}
    \label{fig:sub2}
\end{sidewaysfigure}
    \end{document}

Cause of errors in your MWE is missing width of subfigures, correct syntax is \begin{subfigure}{<width>} and probably missing package rotating, which beside sideways (figure, table) also define macros rotatebox, turn, etc. For details see package documentation.

Edit: One errors was caused by use of float environment inside of (non-float) minipage (what is forbidden), as pointed Gonzalo Medina in his comment.