Graphs Data Types Dataset Types Images from Munzner

  • Slides: 39
Download presentation
Graphs

Graphs

Data Types & Dataset Types Images from Munzner, Visualization Analysis and Design 2 Note:

Data Types & Dataset Types Images from Munzner, Visualization Analysis and Design 2 Note: This is minimal, other data types may be present

Directed Acyclic Graphs (DAGs) Depth 0 Rank 0 Depth 1 Rank 2 Depth 3

Directed Acyclic Graphs (DAGs) Depth 0 Rank 0 Depth 1 Rank 2 Depth 3 Rank 3 Tree DAG

Unix Family c. 1986 – graphviz. org 4

Unix Family c. 1986 – graphviz. org 4

Layered Graphs Many graphs, such as DAGs exhibit a highly layered, ordered, or hierarchical

Layered Graphs Many graphs, such as DAGs exhibit a highly layered, ordered, or hierarchical structure. Rank 0 Rank 1 As with the RT-trees, layout should preserve the ordering by encoding it with one spatial dimension Ø The Sugiyama family of layouts target these graphs Rank 3 DAG

Sugiyama Layout – Step 1 Define an ordering: • Ranks (longest path from root)

Sugiyama Layout – Step 1 Define an ordering: • Ranks (longest path from root) Ø May reverse some edges in this step • Domain-specific knowledge • “Best layering” (NP-hard) Insert “dummy nodes” for long edges. These will be used for edge routing. Ø How many? Definition of “long”? Adapted from Josh Levine & Miriah Meyer, slides

Sugiyama Layout – Step 2 Layer-by-layer, minimize edge crossings Ø NP-hard Ø Many heurstics

Sugiyama Layout – Step 2 Layer-by-layer, minimize edge crossings Ø NP-hard Ø Many heurstics Ø Many tuning parameters (e. g. , how many passes? ) Adapted from Josh Levine & Miriah Meyer, slides

Sugiyama Layout – Step 3 Finalize x-coordinates for nodes. Route edges. Adapted from Josh

Sugiyama Layout – Step 3 Finalize x-coordinates for nodes. Route edges. Adapted from Josh Levine & Miriah Meyer, slides. Routing image from Gansner et al. 1993

Image from Gansner et al. 1993

Image from Gansner et al. 1993

Sugiyama Layouts Strengths: • Preserves flow • Relatively fast (up to ~5 k nodes)

Sugiyama Layouts Strengths: • Preserves flow • Relatively fast (up to ~5 k nodes) Issues: • Only suited for (near-)ordered graphs Implementations: Adapted from Josh Levine & Miriah Meyer, slides & image from Gansner et al. 1993 • dot (graphviz) • dagre

Drawing DAGs with Enclosure From Stephen Kobourov, slides 11

Drawing DAGs with Enclosure From Stephen Kobourov, slides 11

Drawing DAGs with Enclosure From Stephen Kobourov, slides 12

Drawing DAGs with Enclosure From Stephen Kobourov, slides 12

Euler Diagrams When also possible relationships are shown, they are Venn diagrams. Algorithms can

Euler Diagrams When also possible relationships are shown, they are Venn diagrams. Algorithms can get complicated and produce odd shapes. Hard to scale. From Stephen Kobourov, slides 13

When also possible relationships are shown, they are Venn diagrams. Algorithms can get complicated

When also possible relationships are shown, they are Venn diagrams. Algorithms can get complicated and produce odd shapes. Hard to scale. http: //raweb. inria. fr/rapportsactivite/RA 2009/gravite/3. png , via Stephen Kobourov, slides 14

General Graphs What do we want our graph to show? What tasks? Ø Adjacency,

General Graphs What do we want our graph to show? What tasks? Ø Adjacency, connectivity, path following, clusters, shapes, structures, ordering What qualities in graphs might help? • • • Avoiding edge crossings Avoiding edge bends Keep edge lengths uniform Avoid long edges Cluster similar nodes Maximize crossing angle See Bennett et al. 2007, The Aesthetics of Graph Drawing • • • Known as graph drawing aesthetics / heuristics Avoiding node/edge overlap Maximize global symmetry of graph Maximize local symmetry of graph Distribute nodes evenly Maximize consistent flow direction Emphasize clusters

Force-Directed Layouts Family of layouts that model graph as a physics problem: • Nodes

Force-Directed Layouts Family of layouts that model graph as a physics problem: • Nodes as repulsive particles • Edges as springs Adapted from Josh Levine & Miriah Meyer, slides

Force-Directed Layout, Sketch Repulsion: f. R(d) = CR * m 1 * m 2

Force-Directed Layout, Sketch Repulsion: f. R(d) = CR * m 1 * m 2 / d 2 Ø m 1 , m 2 are node masses or charge Ø d is distance between nodes Attraction: f. A(d) = CA * (d – L) Ø L is the rest length of the spring (applying Hooke’s law) Total Force: Σy=neighbors(x) f. A(||x’ – y’||) * (x’ – y’) – f. R(||x’ – y’||) * (x’ – y’) Adapted from Josh Levine & Miriah Meyer, slides

https: //en. wikipedia. org/wiki/File: Visualization_of_ wiki_structure_using_prefuse_visualization_pack age. png https: //beta. observablehq. com/@mbostock/d 3 -force

https: //en. wikipedia. org/wiki/File: Visualization_of_ wiki_structure_using_prefuse_visualization_pack age. png https: //beta. observablehq. com/@mbostock/d 3 -force -directed-graph

Force-Directed Layouts Strengths: • Flexible • Can tweak / add forces • Can be

Force-Directed Layouts Strengths: • Flexible • Can tweak / add forces • Can be fast when optimized • Not hard to implement Issues: • Few structures preserved • Not stable • Force calculation is O(n 2) Ø Can use quadtree/k-d tree for O(n log n) Ø Can sparsify first • Prone to local minima Ø Simulated annealing can help Adapted from Josh Levine & Miriah Meyer, slides, Image from http: //www. pnas. org/content/104/51/20274/F 1

What can we do in the face of increasing graph size and complexity? Ø

What can we do in the face of increasing graph size and complexity? Ø Derive New Data — Match task, easier to understand Ø Reduce / Aggregate Data — Summarize to fewer items Ø Change View of Data Over Time — Interaction Ø Facet / Partition Data — Show a subset Ø Embed Data — Show a subset in context of a summary Ø Incorporate More Information in the Layout Where have we already seen this?

Domain-specific layout Image/text from Purchase et al. Graph drawing aesthetics and the comprehension of

Domain-specific layout Image/text from Purchase et al. Graph drawing aesthetics and the comprehension of UML class diagrams: an empirical study, 2002

Images from Devkota & Isaacs 2018

Images from Devkota & Isaacs 2018

Attribute-driven Layout Cerebral (Barsky 2008) via Munzner, Visualization Analysis and Design

Attribute-driven Layout Cerebral (Barsky 2008) via Munzner, Visualization Analysis and Design

Constraint-Based Approaches Uses the physics-based approach (energy minimization, stress majorization), but adds to the

Constraint-Based Approaches Uses the physics-based approach (energy minimization, stress majorization), but adds to the objective node-level (and sometimes edge-level) constraints for more flexibility in incorporating domain knowledge. Single constraint: Web. Cola, https: //ialab. it. monash. edu/webcola /examples/Sucrose. Breakdown. html

Constraint-Based Approaches Hoffswell et al. , 2018, Set. Cola

Constraint-Based Approaches Hoffswell et al. , 2018, Set. Cola

Libraries & Platforms with forcedirected options Libraries Platforms/Tools • Graph. Viz • Gephi •

Libraries & Platforms with forcedirected options Libraries Platforms/Tools • Graph. Viz • Gephi • d 3 js • Tulip • cytoscape. js • cola. js • OGDF 27

Representing Graphs with Adjacency Matrices Adapted from Josh Levine & Miriah Meyer, slides 28

Representing Graphs with Adjacency Matrices Adapted from Josh Levine & Miriah Meyer, slides 28

Representing Graphs with Adjacency Matrices Strengths: • Dense representation (? ) • Removes clutter

Representing Graphs with Adjacency Matrices Strengths: • Dense representation (? ) • Removes clutter for dense graphs • Cliques/clusters apparent if well-ordered Issues: • Abstract • Hard to follow links Adapted from Josh Levine & Miriah Meyer, slides 29

Elmqvist et al. 2008, ZAME 30

Elmqvist et al. 2008, ZAME 30

Task Taxonomies – Lee et al. Task Abstractions & Taxonomies may exist for specific

Task Taxonomies – Lee et al. Task Abstractions & Taxonomies may exist for specific data types. Lee et al. contributed one for network data: • Topology-based • Attribute-based • Adjacency – are two items directly connected? • Find set of nodes or links with some attribute value • Accessibility – are two items connected directly or indirectly? • Find extremum of attribute values on nodes or links • Common connections – between two items, what are they both connected to? • Browsing • Follow path • Return to previously visited node • Connectivity – shortest path, clusters, bridges • Overview 31

Patterns in Adjacency Matrices Henry et al 2006 32

Patterns in Adjacency Matrices Henry et al 2006 32

Node. Trix: Hybrid Visualization Henry et al 2007 33

Node. Trix: Hybrid Visualization Henry et al 2007 33

Yang et al. 2017, Blockwise Human Brain Network Visual Comparison 34 Using Node. Trix

Yang et al. 2017, Blockwise Human Brain Network Visual Comparison 34 Using Node. Trix Representation

Some Options for Encoding Graphs with Attributes • Encode attribute directly on node •

Some Options for Encoding Graphs with Attributes • Encode attribute directly on node • Attribute-driven layouts • Multiview techniques Images from Tamara Munzner, Visualization Analysis and Design and Nobre et al. STAR on Multivariate Networks (2019) • Data reduction strategies (aggregation, filtering, derivation) 35

Images Nobre et al. STAR on Multivariate Networks (2019) 36

Images Nobre et al. STAR on Multivariate Networks (2019) 36

37

37

General Starting Points on Graphs • Node-link diagrams are easier to understand, better for

General Starting Points on Graphs • Node-link diagrams are easier to understand, better for path-tasks Trees • Indention good when fits on screen • Node-link & layered good for most tasks but require space Ø Domain-specific layouts can go a long way • Adjacency matrices scale better, good for clusters and dense graphs • Enclosure diagrams good for size comparison tasks but not structure 38

39

39