Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{article}
- usepackage{tikz}
- usetikzlibrary{calc,arrows,positioning}
- begin{document}
- tikzset{
- treenode/.style = {align=center},
- c/.style = {treenode,circle,draw=black,minimum width=1.5em,minimum height=1.5em,text centered,font=footnotesize},
- r/.style = {treenode,rectangle,draw=black,minimum width=1.5em,minimum height=1.5em,text centered,font=footnotesize},
- level 1/.style={sibling distance=60mm},
- level 2/.style={sibling distance=30mm},
- level 3/.style={sibling distance=15mm},
- level 4/.style={sibling distance=7mm}
- }
- begin{tikzpicture}[->,>=stealth',thick]
- node[c] {a}
- child{ node[c] {b}
- child{ node[c] {c}
- child{ node[c] {d}
- child{ node[r] {0}}
- child{ node[r] {0}}
- }
- child{ node[c] {d}
- child{ node[r] {0}}
- child{ node[r] {1}}
- }
- }
- child{ node [c] {c}
- child{ node[c] {d}
- child{ node[r] {0}}
- child{ node[r] {0}}
- }
- child{ node[c] {d}
- child{ node[r] {0}}
- child{ node[r] {1}}
- }
- }
- }
- child{ node[c] {b}
- child{ node [c] {c}
- child{ node[c] {d}
- child{ node[r] {0}}
- child{ node[r] {0}}
- }
- child{ node[c] {d}
- child{ node[r] {0}}
- child{ node[r] {1}}
- }
- }
- child{ node [c] {c}
- child{ node[c] {d}
- child{ node[r] {1}}
- child{ node[r] {1}}
- }
- child{ node[c] {d}
- child{ node[r] {1}}
- child{ node[r] {1}}
- }
- }
- }
- ;
- end{tikzpicture}
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement