treeexample2.tex 691 B

123456789101112131415161718192021222324252627
  1. %\begin{tikzpicture}[>=latex, node distance=1cm, on grid, auto,level/.style={sibling distance=60mm/#1}]
  2. \begin{tikzpicture}[>=latex, node distance=1cm, on grid,
  3. auto,composition/.style={yshift=11mm,scale=0.6,diamond,very
  4. thin,draw,fill=black}]
  5. \node [rectangle,draw] (root){$VirtualRoot$}
  6. child{node[composition] (rc) {}
  7. child {
  8. node [rectangle,draw] (d) {$D$}
  9. }
  10. child {
  11. node [rectangle,draw] (a) {$A$}
  12. }
  13. child {
  14. node [rectangle,draw] (b) {$B$}
  15. }
  16. child {
  17. node [rectangle,draw] (c) {$C$}
  18. }
  19. };
  20. %\node[composition] at (root.south) [label=] {};
  21. \path (d) edge [red,pre,open triangle 45-] (a)
  22. (a) edge [red,pre,open triangle 45-] (b) ;
  23. \end{tikzpicture}