This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
latex:tikz:timescales [2018/06/23 14:09] – iwn | latex:tikz:timescales [2021/09/18 17:06] (current) – iwn | ||
---|---|---|---|
Line 17: | Line 17: | ||
Example of timelines and scales with arrows and labels. | Example of timelines and scales with arrows and labels. | ||
+ | For more related figures, please visit https:// | ||
<file python timeline.tex> | <file python timeline.tex> | ||
Line 109: | Line 110: | ||
| | ||
% help functions | % help functions | ||
+ | \def\myx(# | ||
\def\arrowLabel(# | \def\arrowLabel(# | ||
- | \def\xy{{(# | + | \def\xy{(# |
\ifnum \pgfmathresult< | \ifnum \pgfmathresult< | ||
\def\yyp{{(\lt*(-0.10+# | \def\yyp{{(\lt*(-0.10+# | ||
\draw[< | \draw[< | ||
- | (\xy,\yyp) -- (\xy,\yyw) | + | (\myx(#1),\yyp) -- (\myx(#1),\yyw) |
- | node[below, | + | node[below, |
\else | \else | ||
\def\yyp{{(\lt*(0.10+# | \def\yyp{{(\lt*(0.10+# | ||
\draw[< | \draw[< | ||
- | (\xy,\yyp) -- (\xy,\yyw) | + | (\myx(#1),\yyp) -- (\myx(#1),\yyw) |
- | node[above, | + | node[above, |
\fi} | \fi} | ||
\def\arrowLabelRed(# | \def\arrowLabelRed(# | ||
- | \def\xy{{(# | ||
\def\yyp{{(\lt*(-0.10+# | \def\yyp{{(\lt*(-0.10+# | ||
- | \fill[red, | + | \fill[red, |
\draw[< | \draw[< | ||
- | (\xy,\yyp) -- (\xy,\yyw) | + | (\myx(#1),\yyp) -- (\myx(#1),\yyw) |
- | node[below, | + | node[below, |
} | } | ||
| |