Graph/Network Visualizationsfang/cs552/cs552-graph.pdf · Visualizing graphs and clusters as...

33
1 1 Graph/Network Visualization Data model: graph structures (relations, knowledge) and networks. Applications: Telecommunication systems, Internet and WWW, Retailers’ distribution networks knowledge representation Trade Collaborations literature citations, etc. 2 What is a Graph? Vertices (nodes) Edges (links) 1 2 3 0 1 0 1 0 1 0 1 0 1 2 3 1: 2 2: 1, 3 3: 2 1 3 2 Adjacency matrix Adjacency list Drawing

Transcript of Graph/Network Visualizationsfang/cs552/cs552-graph.pdf · Visualizing graphs and clusters as...

1

1

Graph/Network Visualization

Data model: graph structures (relations, knowledge) and networks.

Applications: – Telecommunication systems, – Internet and WWW, – Retailers’ distribution networks– knowledge representation– Trade– Collaborations– literature citations, etc.

2

What is a Graph?

Vertices (nodes)

Edges (links)

1 2 30 1 01 0 10 1 0

123

1: 22: 1, 33: 2

1

32

Adjacency matrix

Adjacency list

Drawing

2

3

Graph Terminology

Graphs can have cyclesGraph edges can be directed or

undirectedThe degree of a vertex is the number of

edges connected to it– In-degree and out-degree for directed graphs

Graph edges can have values (weights) on them (nominal, ordinal or quantitative)

4

Trees are Different

Subcase of general graph

No cycles

Typically directed edges

Special designated root vertex

3

Issues in Graph visualization Graph drawing Layout and positioning Scale: large scale graphs are difficult Navigation: changing focus and scale

5

6

Vertex Issues

Shape

Color

Size

Location

Label

4

7

Edge Issues

Color

Size

Label

Form– Polyline, straight line, orthogonal, grid, curved,

planar, upward/downward, ...

8

Aesthetic Considerations

Crossings -- minimize number of edge crossings

Total Edge Length -- minimize total length

Area -- minimize towards efficiency

Maximum Edge Length -- minimize longest edge

Uniform Edge Lengths -- minimize variances

Total Bends -- minimize orthogonal towards straight-line

5

Graph drawing optimization

3D-Graph Drawing

6

11

Graph visualization techniques

Node-link approach– Layered graph drawing (Sugiyama)

– Force-directed layout

– Multi-dimensional scaling (MDS)

Adjacency Matrix

Sugiyama (layered) method

Suitable for directed graphs with natural hierarchies: All edges are oriented in a consistent direction and no pairs of edges cross

7

Sugiyama : Building Hierarchy

Assign layers according to the longest path of each vertex

Dummy vertices are used to avoid path across multiple layers.

Vertex permutation within a layer to reduce edge crossing.

Exact optimization is NP-hard – need heuristics.

Sugiyama : Building Hierarchy

8

Force directed graph layout

No natural hierarchy or orderBased on principles of physics

The Spring Model

Using springs to represent node-node relations.

Minimizing energy function to reach energy equilibrium.

Initial layout is importantLocal minimal problem

9

Spring Layout

17

Energy Function

18

10

Network of character co-occurrence in Les Misérables

11

Multi-dimensional Scaling

Dimension reduction to 2D Graph distance of two nodes are as close to 2D

Euclidean distance as possibleMDS is a global approach Distance between two nodes: shortest path

(classical scaling).Weighted distances ( , ,

w , , ,

MDS for graph layout

12

Other Node-Link Methods

Orthogonal layout– Suitable for UML graph

Radial graph– Often used in social networks

Nested graph layout– Apply graph layout

hierarchically

– Suitable for graphs with hierarchy

Arc Diagrams

Arc DiagramLes Misérables character relations

13

Arc Diagram

http://www.bbc.co.uk/news/business-15748696

EU Financial Crisis:

14

Summary: Node-Link

Pros– Intuitive– Good for global structure– Flexible, with variations

Cons– Complexity >O(N2)– Not suitable for large

graphs

Adjacency Matrix

matrix, for a graph with N nodes. (i, j)

position represent the relationship of the ith node

and jth node.

15

Adjacency Matrix

Edge weight

Directional edges

Sorting: node order

Path searching and path tracking ?

30

16

Node Order

Path Tracking

17

Adjacency matrix summary

Avoid edge crossing, suitable for dense graphsVisually more scalableVisualization is not intuitiveHard to track a path

MatLink

18

Hybrid Layout

Using adjacency matrix to represent small communities

Node-link for relationships between communities

NodeTrix

19

GMap Visualizing graphs and clusters as geographic maps to

represent node relations (geographic neighbors)

Topological graph simplification

Reducing amount of data

– Reducing nodes: clustering

– Reducing edges: minimal spanning tree

– Edge bundling

Problems:– Loss of data

20

Clustering

Edge Bundling

21

Edges are modeled as flexible springs that are able to attract each other.

Force Directed Edge Bundling

Edges clusters are found based on a geometric control mesh.

Geometry Based Edge Bundling

22

Bottom-up merging approach, similar to hierarchical clustering

Minimize amount of ink used to render a graph.

Multilevel Agglomerative Edge Bundling

Skeletons: medial axes of edges which are similar in terms of positions information.

Iteratively attracting edges towards the skeletons.

Skeleton-based Edge Bundling

23

Comparison

Interaction

Viewing– Pan, Zoom, Rotate

Interacting with graph nodes and edges – Pick, highlight, delete, move

Structural interaction– Local re-order and re-layout– Focus+Context– Roll-up & Drill-down

24

Fisheye Focus+Context; Overviews + details-on-demand Distortion to magnify areas of interest: zoom

factors of 3-5Multi-scale spaces: Zoom in/out & Pan left/right

Interaction with Social Networks

Need to consider the social factors and behaviors related to nodes and edges

25

50

26

Graph Visualization Tools

Prefuse (Java)

Pajek

UCINET / NetDraw

Sentinel Visualizer

JUNG (Java Universal Network/Graph framework)

Graphviz

Gephi

TouchGraph

D3

http://prefuse.org/

27

http://prefuse.org/

Pajek

Sentinel Visualizer Link Analysis, Data

Visualization, Geospatial Mapping, and Social Network Analysis (SNA)

UCINET / NetDraw Analysis and visualization

of networks and graphs

28

55

Example: trade

56

Example: email traffic

29

57

Example: Subway map

58

Web page connections

30

Communication Networks

Hypergraphs

31

Definition

A hypergraph is a generalization of a graph, where an edge can connect any number of vertices.

A hypergraph H is a pair H = (V,E) where V is a set of nodes/vertices, and E is a set of non-empty subsets of V called hyperedges/links.

The Hypergraph H = (V,E) where

V = (1,2,3,4,5) and E = {(1,2) (2,3,5) (1,3), (5,4) (2,3)}

32

Applications Data Mining Biological Interactions Social Networks Circuit Diagrams

Graph Representations

33

Edge Nodes: Representative Graph