# How to place text above the figure/table

How to place text above the rotated Figure (LANDSCAPE) in the same page. I tried but text automatically moved to the following page.

TEXT TEXT....

\begin{landscape}
\begin{table}[]
\centering
\includegraphics[width=160mm]{figures2/comparation3.png}
\caption{A comparison of Aloha protocols}
\label{tab:ComparationAloha}
\end{table}
\end{landscape}


I added this code, but one part of table disappeared. I must have type TABLE since I need it for list of tables later.

\lipsum[11]
\begin{table}[h!]
\rotatebox{90}{\parbox{100mm}{
\includegraphics[width=160mm, rotate=90]{figures2/comparation3.png}
\caption{A comparison of Aloha protocols}
\label{tab:ComparationAloha}}}
\end{table}
\lipsum[12]

• Welcome to TeX SX! Do you want the whole environment to be rotated (including the caption)? Apr 23 '18 at 23:26
• @Bernard I want to rotate only figure/table Apr 23 '18 at 23:41
• Together with caption Apr 23 '18 at 23:47
• Note that if the rotated image is to have a height of 160 mm and has a caption there remains not much space for text… Apr 23 '18 at 23:48
• I have few sentences, or maybe I will reduce the size of image Apr 23 '18 at 23:49

It's very simple with package adjustbox (needless to load graphicx in this case – this package does it for you):

\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{lipsum}

\begin{document}

\lipsum[11]
\begin{figure}[!htb]
\centering
\adjincludegraphics[width = 150mm, rotate = 90]{Piero_di_Cosimo_2}
\caption{A comparison of Aloha protocols}
\label{tab:ComparationAloha}
\end{figure}
\lipsum[12]

\end{document}


If you want to rotate both the graphic file and its caption, you can use this code:

\lipsum[11]
\begin{center}
\rotatebox{90}{\parbox{100mm}{
\includegraphics[width = 100mm]{Piero_di_Cosimo₂}
\captionof{figure}{A comparison of Aloha protocols}
\label{tab:ComparationAloha}}}
\end{center}
\lipsum[12]