5Graph Visualisation Many related fields. What's touched: Vision, Perception, and PsychologyAppliedMany related fields.Not possible to include everything.Try to cover the basics.Assume you know nothing about graph visualisation.What's touched:Visual Representation (trees).Layout algorithms (general graphs).EvaluationApplications and libraries.What's not covered: a lotHuman Computer InteractionSociologyInformation VisualisationTheoreticalGraph DrawingAlgorithms
6Visualisation and Cognition Information visualisation: all about external cognition.Working memory capacity: 7 +/- 2.Can’t really “think” without cognitive tools: writing, math symbols, diagrams, interactive visualisation, etc.Brain and cognitive tools have to work together.Computer is good at addition, very good at it, but that's about it.Human brain is a very good pattern recogniser.Visualisation matters only if user cares.All visualisation methods should be evaluated with users.
7Outline Introduction Trees and Hierarchies General Graphs Beyond this talk
8Terminology What's a “tree”? What's a “hierarchy”? A (connected) undirected graph without cycles.What's a “hierarchy”?A (connected) directed graph without cycles.Very important in Information VisualisationVery common in the real world.Simpler (less edges) than general graphs.
9Most Famous Tree Visualisation Is? Indented LayoutPlaces all items along vertically spaced rowsUses indentation to show parent child relationshipsExample: Windows explorerProblems:Only showing part of the treeBad aspect ratio (not space efficient)
11Dendrogram Essentially a layered drawing Orthogonal edgesLayering are done according to the leaves:All the leaves are on the same layerCommonly used in bioinformatics to representThe result of hierarchical clusteringPhylogenetic trees
12Balloon Trees A variation of radial layout Children are drawn in a circle centered at their parents.Effective on showing the tree structureAt the cost of node details
13Hyperbolic Tree Simulate the distortion effect of fisheye lens. Enlarge the focus and shrink the rest.Focus+context.Can be combined with different layout.3D hyperbolic tree:Similar to project a graph onto a sphere.This example uses balloon tree drawing.
143D Tree Visualization - Cone Tree Cone trees are a 3D extension of the 2D layered tree drawing method.Parent at the tip of a cone, and its children spaced equally on the bottom circle of the coneEither horizontal or verticalThe extension to 3D does not necessarily means more information can be displayedOcclusion problemCouple with interaction is essential
15Other 3D Tree Visualizations 3D poly-plane tree visualizationPut subtrees on planes.Arrange these planes in 3D to reduce occlusion.In this example, layered drawing is used within each plane.3D layered treeOnly one cone.Layers are the parallel circles on the surface.Example: color indicate the layer.
16Space-Filling Methods - Treemap Treemap uses containment to show the hierarchy.It partitions the space recursively according to the size of subtreesIt is space-efficient compare to node-link diagramIt is effective in showing the leaf nodes;But difficult to see the non-leave nodes
17Variations of Treemap Cushion treemap Voronoi treemap Use shading to help identify the levels in a treemapVoronoi treemapSimilar idea but uses voronoi diagram as partitionThe space does not have to be rectangle.
18Beamtree A variation of treemap in 3D. Using overlap instead of nesting to show the hierarchy3D version: representing each node as a beamA bigger example
19Space-Filling Tree Layout Try to use as much screen space as possible.Layout a tree according to the recursive partition of the screen space.The area allocated to a subtree is proportional to its size.A bigger example: nodes.Use all the screen space.Not the most effective on showing tree structure.
20Icicle Trees Edges implied by adjacency and spatial relationship. A bigger example (from infovis toolkit)
21Information Slice and Sunburst Diagrams Also a space-filling method.Radial version of icicle trees.Node size is proportional to the angle swept by a node.SunburstInformation Slice combines with focus+context.Details are shown outside or inside the ring.
22Elastic Hierarchies Hybrid of node-link diagrams and Treemaps. Example:Treemap nested within a node-link diagram.Not the other way around.Node-link diagram inside a treemapLots of crossings
23TreeViewerVisualizes trees in a form that closely resembles botanical treesThe root is the tree stemNon-leave nodes are branchesLeave nodes are “bulbs” at the end of branchesExample: Unix home directory.
24Collapsible Cylindrical Trees Telescope metaphorA set of nested cylindersAll cylinders of level 1 nodes are shown in a horizontal fashion,Like being put on a stick.A cylinder is constructed for the children of a node, and has a smaller radius.This cylinder is nested and hidden within the cylinder contain the parentIt can be pulled out or collapsed as necessary.
25Tree Representation Evaluation “User Experiments with Tree Visualization Systems”, InfoVis 2004Compared 6 tree visualisation systems:TreeMapCushion TreeMapBeamTreesHyperbolic treeTreeViewerWindows Explorer (base-line)Data: eBay taxonomy5 levels and 5799 nodes.Shallow and wide.15 tasks:About tree structure and node attributesMeasurements:AccuracyCompletion timeUser satisfactionResult:Windows Explorer scores bestOnly TreeMap achieves the similar level as Explorer, others perform worse.Possible causes:No tight integration with other tools.Missing functionality.
26Tree Representation Evaluation “Qualities of Perceived Aesthetic in Data Visualization”, CHI 2007
27Outline Introduction Trees and Hierarchies General Graphs Beyond this talk
29Graph Drawing Aesthetics Aesthetics are the graphic properties layout algorithms try to optimise.CrossingsAspect ratioEdge length (several variations)Angular resolutionSymmetry
30Which Aesthetic is the most important? The relative importance among aestheticsIncluding 5 aesthetics:minimizing edge crossings,minimizing bends,symmetry.minimum angleorthogonalityPurchase, H.C (1997)DatasetPlanar graphs with 16 nodes and 28 edges5 aesthetics and 10 drawings2 drawings for each aesthetics: representing a strong or weak presence.b: bends, c: crossings, m: minimal angle, o: orthogonality, s: symmetry
31Which Aesthetic is the most important? TasksShortest path: between two nodes;Connections between nodes: number of nodes to disconnect two nodes;Connections between subgraphs: number of nodes to disconnect two subgraphs.ResultsMost important: reducing the number of crossing;Less effective: minimizing the number of bends and maximizing symmetry;Not obvious: maximizing the minimum angle and orthogonality.
32Directed Graph – Layered Layout Sugiyama methodCycle removal: if there is directed cycles, temporarily reverses the direction of some to make the graph acyclic;Layer assignment: nodes are assigned to horizontal layers, and thus determines their y-coordinate;Crossing reduction: within each layer the nodes are ordered to reduce the number of crossings;Horizontal coordinate assignment: the x-coordinates of each vertex is determined.
33Undirected Graphs – Force Directed Methods Use a physical analogy to draw graphsA graph as a system of objects with forces acting between them.VertexObject of the system;Interacting with each other based on “some” force(s).EdgeA different type of object;Not interacting with each other;Add new force(s) to vertex object.Assumption:A balanced system gives a good layoutEquilibrium state:A system configuration with minimal energy level:Locally, the sum of the forces on each object is zero.Globally, the system has a minimal total energy.Many force-directed methods.Model: a force system defined by vertices and edgesAlgorithm: technique for finding an equilibrium state
34Spring Embedder Vertex: Edge: 1. 2. Electrically charged particles; repel each other.Ensure vertices not too close to each otherEdge:Spring that connects particles;Attraction force when longer than the natural length; repulsion force otherwise.Ensure connected vertex distance is about the natural spring length.1.2.
35Springs and Electrical Forces The force on a vertex v :fu,v : force on v by the spring between u an vgu,v : Electrical repulsion exerted on v by vertex ux component of the force on vd(p,q) : Euclidean distance between points p and q(xv, yv): position of vertex vl0: natural length (zero energy) of the spring between u and v.k1 : stiffness of the spring between u and vk2 : the strength of the electrical repulsion between u and v
36Finding an Equilibrium State Initially place nodes at random location.At each iteration:Force F(v) on each vertex is computedEach vertex v is moved in the direction of F(v) by a small amount proportional to the magnitude of F(v)Stops when equilibrium is achieved or some conditions are met.Not the fastest, but allow smooth animation.Calculating attractive forces only between neighbors: O(|E|)Calculating repulsive forces between all pair of vertices: O(|V|2)Bottleneck of the algorithm in general.
38Faster Force Directed method - FADE It is feasible to usea spring method, thena geometric clustering methodTo obtain a good graph clustering.ClusteredGraphGraph
39Quadtree A tree data structure: Each internal node has exactly four children.Often used to partition a two dimensional space.By recursively subdividing into four quadrants.
40Barnes-Hutt Method Computing forces between stars. Use Quadtree to cluster the stars.Use forces between clusters to approximate forces between individual stars.rootaTLBRcbBLabddcefef
41Barnes-Hutt methodThe contents of a subtree of can be approximated by a mass at the centroid.rootefadcbssTLBRcBLabdef
42Barnes-Hutt methodThe force that the subtree s exerts on the star x can approximate the sum of the forces that the nodes in s exert on x.rootaTLBRcsbsBLabddcefef
43Layout vs. Graph Readability Comparing different layout methods.A planar graph of 17 nodes and 29 edges .maximum node degree is 4:For orthogonal drawing ;A quite strong constraint.3 layout algorithms:Force-directed: 3 variations;Planar orthogonal grid drawing: 2 variation;Planar grid drawing: 3 variations.Purchase, H.C. (1998)
44Layout vs. Graph Readability Tasks:Shortest path between two nodes;Disconnect two nodes;Disconnect two subgraphs.Results:One planar grid drawing method (SEIS) produced significantly more errors than the rest;For the rest, the average response times were not significantly different.So there is not much difference between layout algorithms!
45Does 3D Help? Comparing various visualisations in 2D and 3D 2D: orthographic (parallel) projectionStatic Perspective: perspective projectionStereo: shutter glassesPassive rotation: automaticHand coupled rotation: mouse-controlled;Head coupled perspective: head-controlled;Stereo, head coupled perspective.“Stereo, head coupled perspective” setup
46Test SetupTask: whether two nodes are connected by a path of length 2.Dataset: randomly laid out graph.Ware, C., Franck, G. (1996)
47Results:A static perspective is only slightly better than a 2D diagram;3D motion and stereo viewing both help but not particularly important;Both are more significant than stereo cues.Stereo viewing alone increases the understandable graph size by a factor of 1.6;Head coupling alone increases by a factor of 2.2;Combine the two (head-coupled stereo viewing) increases by a factor of 3;
48Beyond Node-Link Diagram Matrix RepresentationA graph can be represented by a connectivity matrix.Advantage:No edge crossing.Disadvantage:Large empty space for sparse graph.Ghoniem, M. et al. (2004)
49Node-Link Diagram vs. Matrix Tasks:estimating the number of nodes;estimating the number of links;finding the most connected node;finding a node with a given label;finding a link between two specified nodes;finding a common neighbor between two specified nodes;finding a path between two nodes.DatasetRandom graph of size: 20, 50, and 100 nodes;For each size, different link density: 0.2, 0.4 and 0.6.
50ResultsWhen graphs are bigger than 20 vertices, matrix outperforms node-link diagrams on most tasks.Only path finding is consistently in favor of node-link diagrams.For small graphs:Node-link diagrams are always more readable than matrices;For larger graphs:Matrices are 30% more accurate;Matrices have comparable or better answer time.For more complex tasks such as “path finding”, interaction is needed:For example, displaying all the possible paths after selecting two nodes;For matrix, path can be displayed by connecting cells using curves (mix matrix with node-link diagram).
52Graphviz - Graph Visualization Software Open source.More a command line tool.Several types of layout algorithms.HierarchicalForce directedRadialCircularFast for large graphs.Sophisticated algorithms.
53Outline Introduction Trees and Hierarchies General Graphs Beyond this talk
54Graph Visualisation is much more … What's not coveredInteraction.Temporal/dynamic graph visualisation.Geological graph visualisation.Graph visualisation in specific domains.Social network analysis (centralities).Graph algorithms (such as clustering).Multiple graph visualisation.Multivariate graph visualisation.And many more …Graph Visualisation
55Possible research problems Improve existing methods:Another variation of TreeMap?Another variation of force-directed methods?Methods based on new ideas:A new visual representation of trees and hierarchies?A layout algorithm based on a new natural analogy?A less well studied area:Many of those on the last slides.… but do we really need them?
56Applied Approach More problems than available resources can address. Work on “important” problems.A discovery is “important” only because it is usefulNot how difficult to discover it.Talk to the users (such as anyone uses graphs)Yes, it will take time,Yes, some requirements may seem unreasonable,But this is the best way to find “important” problems.Once has the problem, start working on it.Use external cognitive tools.Implement existing methods and apply them to real data: you will find new research problems.
57Contribute to the Community You are what you contribute to the community.Not just how many papers you publish.Code, dataset, reviewing, organisation, promoting, …Missing a Information Visualisation/Visual Analytics ToolkitVisualisation Toolkit (VTK) for Scientific Visualisation.Require lots of efforts, but everyone can contribute.Take the extra step to make your code actual reusable by others (and documentation).Make your tool part of a larger package.GraphVisToolkit InfoVisToolkit VisualAnalyticsToolkit.
58Gephi – Graph Visualisation Platform and Library
59Think big we are only limited by our imaginations And, I am always happy to help!