visualization taxonomies and techniques graphs university of texas – pan american csci 6361,...

45
Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Upload: duane-wright

Post on 26-Dec-2015

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Visualization Taxonomies and Techniques

Graphs

University of Texas – Pan American

CSCI 6361, Spring 2014

Page 2: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Graphs and Networks

Page 3: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Graphs Show “Connections”

• Connections among …anything

• Model connected set as a Graph– US telephone system – World Wide Web – Distribution network for on-line

retailer – Call graph of a large software system – Semantic map in an AI algorithm – Set of connected friends

• Graph/network visualization is one of the oldest and most studied areas of visualization

NSFNET Traffic 1991, NSFNET backbone nodes are shown at the top, regional networks below, traffic volume is depicted from purple (zero bytes) to white (100 billion bytes), visualization by NCSA using traffic data provided by the Merit

Page 4: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Graphs Show “Connections”

• Connections among …anything

• Model connected set as a Graph– US telephone system – World Wide Web – Distribution network for on-line

retailer – Call graph of a large software system – Semantic map in an AI algorithm – Set of connected friends

• Graph/network visualization is one of the oldest and most studied areas of visualization

Trade among countries.

There are many challenges …

Page 5: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Graphs Show “Connections”

• Connections among …anything

• Model connected set as a Graph– US telephone system – World Wide Web – Distribution network for on-line

retailer – Call graph of a large software system – Semantic map in an AI algorithm – Set of connected friends

• Graph/network visualization is one of the oldest and most studied areas of visualization

SEMNET, 1987

Page 6: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Graphs Show “Connections”

• Connections among …anything

• Model connected set as a Graph– US telephone system – World Wide Web – Distribution network for on-line

retailer – Call graph of a large software system – Semantic map in an AI algorithm – Set of connected friends

• Graph/network visualization is one of the oldest and most studied areas of visualization vizster, social network, Facebook

http://vis.stanford.edu/jheer/projects/vizster/(download *.wmv)

Page 7: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Social Network Visualization

• Social Network Analysis – Among first studied– http://www.insna.org– Early, by social scientists

• Sociologists, anthropologists

• Now, very keen interest in social networks

– From Facebook to terrorists

Page 8: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Graphs and NetworksSome techniques

• Graph layout

• Node link layouts– Layered / Sugiyama– Force directed– Other

• Matrix layouts

• Attribute based layouts

Page 9: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

About Graphs

• Graph: G = (V, E)

• Vertices (nodes) connected by edges (links)

– Can have cycles – Edges can be directed or undirected – Degree of vertex is number of edges

connected to it • In-degree and out-degree for directed

graphs

– Edges can have values (weights)• nominal, ordinal or quantitative

• Trees– Special case of general graph – no

cycle

– Typically directed edges – Special designated root vertex

Page 10: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Graph Visualization Challenges

• Graph layout and positioning – Make a concrete rendering of abstract

graph

• Navigation/Interaction – How to support user changing focus,

moving around the graph, …

• Scale – Small graphs are not hard for above– BUT, 10 – 100 – 1000 … which are the

interesting ones

• Layout – an entire research community focus

Page 11: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Aesthetic ConsiderationsHow to lay out a graph

• Line (edge) Crossings – – minimize towards planar

• Total Edge Length – – minimize towards proper scale

• Area – – minimize towards efficiency

• Maximum Edge Length – – minimize longest edge

• Uniform Edge Lengths – – minimize variances

• Total Bends – – minimize orthogonal towards straight-line

• All at once!– Various studies examined which of the aesthetic factors matter most and/or what

kinds of layout/vis techniques look best – Results mixed: Edge crossings do seem important

Page 12: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Graph VisualizationTask Taxonomy

• 1. Topology-based tasks – Adjacency: Find the set of nodes adjacent to a node – Accessibility: Find the set of nodes accessible to a node – Common connection: Given nodes, find the set of nodes connected to all – Connectivity: Find shortest path, Identify clusters, Identify connected components

• 2. Attribute-based tasks – For nodes: Find the nodes having a specific attribute value – For edges: Given a node, find nodes connected only by certain kinds of edges

• 3. Browsing tasks – Follow path: Follow a given path – Revisit : Return to a previously visited node

• 4. Overview task – Compound exploratory task : Estimate size of a network, find patterns, …

Page 13: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Layout TechniquesQuick Look

• Layout algorithms can create:

– polyline edges – planar –

• no edge crossings

– orthogonal – • horizontal and vertical

lines/polylines

– grid-based - • vertices, crossings,

edge bends have integer coords

– curved lines – hierarchies – circular – ...

• P. Mutzel, et al. Graph Drawing ’97

Page 14: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Layout TechniquesQuick Look

• Will see a couple

• Common techniques:

– Hierarchical – Force-directed – Circular – Geographic-based – Clustered – Attribute-based – Matrix

Page 16: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Hierarchical Graph Layout

Page 17: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Hierarchical Graph Layout Sugiyama layout

• Often called Sugiyama layout

• Try to impose hierarchy on graph

– Reverse edges if needed to remove cycles

• Introduce dummy nodes

• Put nodes into layers, or levels

• Order l->r to minimize crossings

Page 18: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Hierarchical Layout Sugiyama Layout

• Readable top down flow

• Good for graphs that have an intrinsic ordering

– Not suitable for graphs that don’t have an intrinsic top down structure

– ‘Depth’ in graph mapped to one axis

• Lots of gd libs– graphviz lib:

http://www.graphviz.org– http://gephi.org Unix “ancestry”

Page 19: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Hierarchical Layout Sugiyama Layout

• Readable top down flow

• Good for graphs that have an intrinsic ordering

– Not suitable for graphs that don’t have an intrinsic top down structure

– ‘Depth’ in graph mapped to one axis

• Lots of gd libs:– graphviz lib,

http://www.graphviz.org– http://gephi.org

Page 20: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Force-Directed Layout

Page 21: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Force-Directed Layout

• Define through equations

• Spring model (common) – Edges – Springs (gravity

attraction) – Vertices – Charged particles

(repulsion)

• Equations for forces

• Iteratively recalculate to update positions of vertices

• Seeking local minimum of energy

– Sum of forces on each node is zero

http://mbostock.github.io/protovis/ex/force.html

Page 22: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Force-Directed Example

• “Springs (forces) find iteratively find equilibrium”

Page 23: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Force-Directed ExamplesProtovis and D3

• Protovis: http://vis.stanford.edu/protovis/ex/force.html

• D3 (cf collapsible force directed): https://github.com/mbostock/d3/wiki/Gallery

Page 24: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

GraphsForce Directed Layout

• Very flexible, aesthetic layouts on many types of graphs– Can add custom forces– Relatively easy to implement

• Repulsion loop is O(n2) per iteration– Can speed up to O(n log n) using quadtree or k-d tree

• Prone to local minima– Can use simulated annealing

Page 25: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

GraphsForce directed layout

• Many variations, but physical analogy:

• Repulsion : fR(d) = CR * m1*m2 / d2

– m1, m2 are node masses– d is distance between nodes

• Attraction : fA(d) = CA * (d – L)– L is the rest length of the spring– i.e. Hooke’s Law

• Total force on a node x with position x’– Σ neighbors(x) : fA(||x’-y’||) * (x’-y’) + -fR(||x’-y’||) * (x’-y’)

• Examples– 23 second example: http://www.youtube.com/watch?v=AYrkWSDkfLM

– 60 second example: http://www.youtube.com/watch?v=QlXRapQW4q0

Page 26: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

GraphsForce-directed layout

• Recall

Page 27: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Force Directed with Magnets• http://www.youtube.com/watch?v=K4GOxJywB-U

• Not much 1st minute

Page 28: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Other Layouts

• Orthogonal– Good for UML diagrams– algorithmically complex

Page 29: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Circular Layout

• Circular Layout– Very simple – Space vertices out around circle – Draw lines (edges) to connect vertices– But, aesthetic heuristics …

• Textarc (more next time)

Page 30: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Textarc: http://www.textarc.org/

Page 31: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Nested Layouts

• Recursively apply layout algorithms

• Good for graphs with hierarchical structure

Page 32: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Graphsvisual complexity

• http://www.visualcomplexity.com/vc/

Page 33: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

GraphsAdjacency Matrix

Page 34: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

GraphsAdjacency Matrix

• Alternative to node link

• Adjacency matrix representation– “Mark” where edges are– E.g., A-B, A-C (and inverse)

Page 35: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

GraphsAdjacency matrix

• Good for dense graphs– Visually scalable– Can spot clusters

• Nodes of high degree have many connections, so many entries in adjacency tale

• Lots of dots at clusters

• However– Abstract visualization– Hard to follow paths

Page 36: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Matrix Representations

• Interest in matrix representations of graphs

• Regularity, symmetry, and structure of a matrix good

• Well understood

• Difficulties of scale

Page 37: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

MatrixExplorer

• Provides matrix view in combination with node-link and various operations for gaining different perspectives

– Henry & Fekete TVCG (InfoVis) ‘06

Page 38: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Node Reordering

• Important operation with matrix representations

Page 39: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

NodeTrix

• Hybrid of matrix and node-link

– Henry & Fekete TVCG (InfoVis) ‘07

Page 40: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

GraphsAttribute Driven

Page 41: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

GraphsAttribute-driven layout

• Large node-link diagrams can be challenging to perceptually order

• Can use data attributes to perform layout– E.g., scatterplot based on node values– Dynamic queries and/or brushing can be used to enhance perception of

connectivity

Barsky, 2008

Page 42: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

GraphsAttribute-driven layout

• Semantic substrates

Shneiderman, 2006

Page 43: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Graphs Conclusion

• Trees:– Indentation

• Simple, effective for small trees

– Node link and layered

• Looks good but needs exponential space

– Enclosure (treemaps)

• Good for size related tasks but suffer in structure related tasks

• Graphs:– Node link

• Familiar, but problematic for dense graphs– Adjacency matrices

• Abstract, hard to follow paths– Attribute-driven

• Not always possible

• No single “best” solution – a design problem

Page 44: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

Web Pages and VideosGraphs

• vizster, social network, Facebook: http://vis.stanford.edu/jheer/projects/vizster/, (download *.wmv)

• NY Times diseases: http://www.nytimes.com/interactive/2008/05/05/science/20080506_DISEASE.html

• Force directed layout protovis: http://mbostock.github.io/protovis/ex/force.html

• Protovis: http://vis.stanford.edu/protovis/ex/force.html

• D3 (cf collapsible force directed): https://github.com/mbostock/d3/wiki/Gallery

• Magnets and graphs: http://www.youtube.com/watch?v=K4GOxJywB-U

• Force directed layout examples– 23 second example: http://www.youtube.com/watch?v=AYrkWSDkfLM

– 60 second example: http://www.youtube.com/watch?v=QlXRapQW4q0

• Visual complexity: http://www.visualcomplexity.com/vc/

Page 45: Visualization Taxonomies and Techniques Graphs University of Texas – Pan American CSCI 6361, Spring 2014

End

• .