Putting an arrow next to table
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.
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}
The following code contains two options; the first one doesn't use any special symbol, simply adds /time(incr.)
to the column header to indicate an increasing time sequence order. The second one is a TikZ
based solution:
\documentclass{article}
\usepackage{booktabs}
\usepackage{tikz}
\usetikzlibrary{calc}
\newcommand\tikzmark[1]{%
\tikz[overlay,remember picture] \coordinate (#1);}
\begin{document}
\noindent\begin{tabular}{lc}
\toprule
head1 & data/time(incr.) \\
\midrule
text & 3 \\
text & 2 \\
text & 1 \\
\bottomrule
\end{tabular}
\vspace{1cm}
\noindent\begin{tabular}{lc}
\toprule
head1 & data \\
\midrule
text & 3\tikzmark{start}\\
text & 2 \\
text & 1\tikzmark{end} \\
\bottomrule
\end{tabular}
\begin{tikzpicture}[overlay,remember picture]
\draw[->] let \p1=(start), \p2=(end) in ($(\x1,\y1)+(0.8,0.2)$) -- node[label=right:time] {} ($(\x1,\y2)+(0.8,0)$);
\end{tikzpicture}
\end{document}