CS171: Visualization
Trees & Networks
Hanspeter Pfister pfister@seas.harvard.edu
xkcd
CS171: Visualization Trees & Networks Hanspeter Pfister - - PowerPoint PPT Presentation
CS171: Visualization Trees & Networks Hanspeter Pfister pfister@seas.harvard.edu xkcd This Week HW 6 due today PII due Monday, April 8 No lab tomorrow morning! Special D3 Lab, Friday, 4-5 pm, Science Center E with
Hanspeter Pfister pfister@seas.harvard.edu
xkcd
with Sergiy Nesterko (Stat 221)
Moritz Stefaner Well-Formed Eigenfactor
Frank van Ham IBM Research fvanham@us.ibm.com
Mauro Pichiliani
Jerome Cukier, D3 Writeup About the Map
Kailie Parrish
Kailie Parrish
Kailie Parrish
[Godel, Escher, Bach. Hofstadter 1979]
Bonkers World
– Indented – Node link – Enclosure – Layered
– Node link – Matrix – Network summarizations
and a set of edges E, consisting of vertex pairs.
1 2 3 4 1 2 3 4 1 2 3 4
Definitions
A directed graph An undirected graph 0.1 5 0.3 Weighted Unconnected A cycle Node degrees 2 2 3 2 1 A connected acyclic graph, a.k.a. a tree An acyclic graph Node depths 1 1 2 2 2 A rooted tree
root parent child leaf Definitions
– Indentation – Node link – Enclosure – Layering
Drawing trees
+Fast and simple to implement +Could be text only (or HTML)
function draw(node:Node, depth:int) { println(<depth spaces> + nodelabel); for each child c do draw(c,depth+1) } draw(root,0);
Drawing trees - indentation
Drawing trees – node link
– Nodes layered by depth in tree – No edge crossings – Similar subtrees drawn in similar ways – Compact representation
– Bottom up recursive approach – For each parent make sure every subtree is drawn – Pack subtrees as closely as possible – Center parent over subtrees
Drawing trees – node link
Subtrees already drawn with RT algorithm
Drawing trees – node link
Drawing trees – node link
Drawing trees – node link
d3
– Layout in hyperbolic space (which grows exponentially as well!) – Distortion viewers – Filtering
Walrus (hyperbolic space)
Drawing trees – node link
DOITree (filtering) Fisheye distortion
A C D E A B B C D E
Drawing trees – enclosure
A:10 C:3 D:3 B:7 E:1 F:3 G:1 H:2 A B C D E F G H
Drawing trees – enclosure
http://w3.win.tue.nl/nl/onderzoek/onderzoek_informatica/visualization/sequoiaview/
Drawing trees – enclosure
rectangles.
Drawing trees – enclosure
Drawing trees – layering
d3
Drawing graphs
UNIX ancestry
Drawing graphs – node link
– From domain specific knowledge – Longest path from root – Algorithmically determine best layering (NP-Hard)
1 2 5 9 6 7 3 4 8 11 10
Drawing graphs – node link
1 2 5 9 6 7 3 4 8 11 10
Drawing graphs – node link
1 2 5 9 6 7 3 4 8 11 10
Drawing graphs – node link
dot - [Gansner et al., A Technique for Drawing Directed Graphs, IEEE Trans on SW Eng., 1993]
Drawing graphs – node link
Drawing graphs – node link
Highschool dating network
– m1, m2 are node masses
– L is the rest length of the spring
– ∑ y ` neighbors(x) : fA(||x’-y’||) * (x’-y’) + ∑ y ` V : -fR(||x’-y’||) * (x’-y’)
Drawing graphs – node link
– For every node pair compute repulsive force – For every edge compute attractive force – Accumulate forces per node – Update node position in direction of accumulated force
Drawing graphs – node link
+ Very flexible, pleasing layouts on many types
+ Can add custom forces + Relatively easy to implement
per iteration
Drawing graphs – node link
– Great for UML diagrams – Algorithmically complex
– Emphasizes ring topologies – Used in social network diagrams
– Recursively apply layout algorithms – Great for graphs with hierarchical structure
Drawing graphs – node link
+ Understandable visual mapping + Can show overall structure, clusters, paths + Flexible, many variations
algorithms are > O(N2)
Drawing graphs – node link
Michael Bostock
Moritz Stefaner Well-Formed Eigenfactor
BBC News
A C B D E A B C D E A B C D E
Drawing graphs – matrices
Image taken from : N. Henry and J.-D. Fekete MatrixExplorer: a Dual-Representation System to Explore Social Networks
Drawing graphs – matrices
Michael Bostock
Wattenberg, 2006
Roll-up graphs based on attribute values
Wattenberg, 2006 Department Location
Michael Bostock Martin Krzywinski
Martin Krzywinski
– Indentation (simple, effective for small trees) – Node link and layered drawing (looks good but needs exponential space) – Enclosure/treemaps (great for size related tasks but suffer in structure related tasks)
– Node link (familiar, but problematic for dense graphs) – Adjacency matrices (abstract, hard to follow paths) – Summarizations (not always possible)