[Tex/LaTex] Putting an arrow next to table

arrowstables

I have a table. Each row in that table represents data at a certain point of time. Lower rows represent data for later times.

To illustrate this, I'd like to draw an arrow at the side (which doesn't really matter) of the table, pointing downwards, labelled with something like "time".

How would I do this?

Best Answer

You can use \Downarrow to put a double arrow, or \downarrow for a single arrow. Applying a \left ... \right will allow it to be scaled to the height of the table.

The text can be added via \rotatebox[origin=c]{90}{time} from the graphicx package.

enter image description here

Notes:

  • Assuming you only want the arrow on the left, then you will need to ensure that you replace the \right\downarrow with \right. at the end of the table. Similarly, replace the \left\Downarrow with \left. if you only want the arrow on the right..

Code:

\documentclass{article}
\usepackage{graphicx}

\begin{document}
$\rotatebox[origin=c]{90}{time}%
\left\Downarrow% Use `\left.` if don't want arrow on this side.
\begin{tabular}{r r}
 1:00 & 2 \\
 3:00 & 4 \\
 5:00 & 6 \\
 7:00 & 8 \\
 8:00 & 10 \\
\end{tabular}
\right\downarrow%  Use `\right.` if don't want arrow on this side.
\rotatebox[origin=c]{90}{time}$
\end{document}
Related Question