This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
latex:tikz:timescales [2018/06/23 14:07] – created iwn | latex:tikz:timescales [2021/09/18 17:06] (current) – iwn | ||
---|---|---|---|
Line 1: | Line 1: | ||
<WRAP group>< | <WRAP group>< | ||
\\ \\ | \\ \\ | ||
- | {{ latex: | + | {{ latex:tikz: |
\\ | \\ | ||
</ | </ | ||
\\ | \\ | ||
- | {{ latex: | + | {{ latex:tikz: |
\\ | \\ | ||
</ | </ | ||
Line 12: | Line 12: | ||
\\ | \\ | ||
</ | </ | ||
- | {{ latex: | + | {{ latex:tikz: |
</ | </ | ||
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, |
} | } | ||
| |