diff options
Diffstat (limited to 'info/drawing-with-metapost/src/rec-simple-tree.mp')
-rw-r--r-- | info/drawing-with-metapost/src/rec-simple-tree.mp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/info/drawing-with-metapost/src/rec-simple-tree.mp b/info/drawing-with-metapost/src/rec-simple-tree.mp index 59657cb1b8..6721d7bd24 100644 --- a/info/drawing-with-metapost/src/rec-simple-tree.mp +++ b/info/drawing-with-metapost/src/rec-simple-tree.mp @@ -15,18 +15,22 @@ vardef make_tree(expr level, bar) = fi enddef; beginfig(1); -picture T[]; -numeric r, theta; -r = 0.58; theta = 60; T1 = image( - make_tree(3, origin -- 100 up); - label.urt("\ $r=" & decimal r & "$, $\theta=" & decimal theta & "$", origin) withcolor \mpcolor{textred}; +picture T[]; numeric r, theta; +r := 0.58; theta := 60; T1 = image( + make_tree(3, origin -- 100 up); ); r := 0.75; theta := 14; T2 = image( - make_tree(10, origin -- 100 up); - label.urt("\ $r=" & decimal r & "$, $\theta=" & decimal theta & "$", origin) withcolor \mpcolor{textred}; + make_tree(10, origin -- 100 up); ); draw T1 shifted 32 up; draw T2 shifted 128 right; + +drawoptions(withcolor \mpcolor{textred}); +r := 0.58; theta := 60; +label.urt("\ $r=" & decimal r & "$, $\theta=" & decimal theta & "$", 32 up); + +r := 0.75; theta := 14; +label.urt("\ $r=" & decimal r & "$, $\theta=" & decimal theta & "$", 128 right); endfig; \end{mplibcode} \end{document} |