Pat Hanrahan
Tree Drawing
Page 1
Why Trees?
Hierarchies
File systems and web sites
Organization charts
Categorical classifications
Similiarity and clustering
Branching processes
Genealogy and lineages
Phylogenetic trees
Decision processes
Indices or search trees
Decision trees
Tournaments
Two Major Visual Representations
Connection: Node / Link Diagrams
Containment / Enclosure
F6
G6
H6
J36
U8
B10
C30
L7 M7
V12
O4 P4 Q4 R4 S4 T4
W8
Page 2
[Furbringer]
C. Elegans Cell Lineage
[Sulston]
Page 3
Page 4
Page 5
Page 6
Classic Tree Drawing
Preorder or inorder traversal
Depth-InOrder Traversal
0
1
2
3
4
5
6
7
0 1 2 3 4 5 6 7 8 9 10 11 13 14 15
Similarly for pre-order, postorder
Note: width = n-1
Page 7
Aesthetic Criteria
1.
Nodes at the same levels should be aligned
2.
Maintain the relative ordering of left and right subtrees
3.
Parent should be centered over the children
4.
A tree and its mirror image should be drawn as reflections of each other
5.
A subtree should be drawn the same way regardless of where it occurs in the tree
Rheingold-Tilford Algorithm
E. Rheingold, J. Tilford, Tidier drawing of trees, IEEE Trans.
Software Engineering, SE-7(2), pp. 223-228. 1981
Page 8
Rheingold-Tilford Algorithm
Left contour
Left threads
Right contour
Right threads
E. Rheingold, J. Tilford, Tidier drawing of trees, IEEE Trans.
Software Engineering, SE-7(2), pp. 223-228. 1981
Rheingold-Tilford Algorithm
Separation = 2
E. Rheingold, J. Tilford, Tidier drawing of trees, IEEE Trans.
Software Engineering, SE-7(2), pp. 223-228. 1981
Page 9
Rheingold-Tilford Algorithm
Translate by (sep+1)/2
E. Rheingold, J. Tilford, Tidier drawing of trees, IEEE Trans.
Software Engineering, SE-7(2), pp. 223-228. 1981
Rheingold-Tilford Algorithm
T = min(h(TL), h(TR)
E. Rheingold, J. Tilford, Tidier drawing