Top Banner
COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia
42

COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Dec 21, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

COMP4048Incremental Graph Drawing

Richard WebberNational ICT Australia

Page 2: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Lecture Overview

• The Problem

• Spring Algorithms

• Trees

• Orthogonal

Page 3: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Incremental Graph Drawing

• The aim of visualisation…to produce representations of information

that are

easy to understand• However…

– Sometimes the information is too “big”– Sometimes the information is dynamic – it

changes while it is being viewed– Visualisation should support exploration

through user interaction

Page 4: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Incremental Graph Drawing

• Incremental Interactive Iterative Dynamic

• Allow insert, delete, manual movement– Reflect changes in the underlying information

• Make the minimum change possible– Reduce computational cost of redraw –

e.g. (Cohen, et al., 1995)

– Reduce cognitive cost of redraw

Page 5: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

The Mental Map

• User maintains an internal model of the visualisation

• Radical change to drawing loss of model (Misue, et al., 1995)

Page 6: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

The Mental Map

• Relative-coordinate scenario– Preserve orthogonal ordering

– Preserve clustering (relative distances)

– Preserve topology (embedding)

• No-change scenario– Preserve position of all existing vertices

Page 7: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Spring-based Algorithms

1. Apply spring algorithm until stable2. Update graph3. Repeat from 1, using current positions as

initial positions– Animating changes helps mental map– e.g., OFDAV (Huang, et al., 1998)– Easy to force no-change scenario– Difficult to force relative-coordinate scenario

Page 8: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Force-Scan

• (Lai, 1993)• Spring variant to remove node overlap• Force = desired d – actual d• Scan order is by horizontal then vertical• Satisfies relative-coordinate scenario• Dummy nodes can be introduces to avoid

edge-vertex crossings

Page 9: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Force-Scan

Page 10: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

OFDAV

• On-line Force-Directed Animated Visualization

• (Huang, et al., 1998)• Layout a spanning tree of limited size

around a node of interest – the “focus”• When focus changes

– Recalculate tree and redo layout– Animate changes to preserve context

• Allows exploration of a partially unknown graph – e.g., WWW

Page 11: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

OFDAV

• On change of focus– Place new focus Qi to buffer of size B

– Remove oldest focus Qi-B from buffer (FIFO)

– Build tree from nodes in buffer plus all neighbours within distance d

d-neighbours of Qi added to graph

d-neighbours of Qi-B probably removed

Page 12: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

OFDAV

• Layout algorithm– Modified spring algorithm– Preserved nodes start in old positions

– Extra gravitational repulsion away from Qi helps focal path form a line

• Spring effectively “animates” the graph change between focal nodes

Page 13: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

OFDAV

Page 14: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Abstraction

• Interaction can involve removing or summarising parts of a graph…

• Replace (large) components with smaller representations

• Often, representation = single node Component is “collapsed” /

“contracted” / “summarised” / “abstracted” / “abridged”

Node is “expanded” / “inflated” / “extracted”

Page 15: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Abstraction

• Components can be– Arbitrary – user-specified

– Geometric clusters of vertices

– Graph-theoretic cluster of vertices

– Specific structures: e.g., cliques, connected components (by specific relationships)

– Encoded in the visualisation structure: e.g. subtrees, cluster graphs, compound graphs

Page 16: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Abstraction of Subtrees

• Start with a single (root) vertex• Expand “interesting” vertices to reveal

next level down

Page 17: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Abstraction of Subtrees

Page 18: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Abstraction of Subtrees

• Can modify algorithm to try to preserve the mental map across expansion and contraction

• E.g., (Demetrescu, et al., 2000)• Can be generalised using Bayesian

models

Page 19: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Abstracting Compound Graphs

• Each vertex can be contracted to hide its descendants, and expanded to reveal them

• Use size/colour/label/… to identify interesting properties of descendants

• Animate to preserve mental map

Page 20: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Abstracting Compound Graphs

Page 21: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Orthogonal Graph Drawings

• Orthogonal Drawings– Vertices placed at integer coordinates– Edges parallel to coordinate axes– Edges can contain bends

• (Papakostas, et al., 1998), (Papakostas, et al., 1996)

• You will see algorithms for drawing these later in the course…

Page 22: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Orthogonal Graph Drawings

• Under the Relative-Coordinates Scenario…

– Place new vertex v such that it minimises rows, columns and bends when routing all (ui, v)

Page 23: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Orthogonal Graph Drawings

• Many cases to consider• hw drawing and n new vertices

8n new bends and ((h+w)/2 + 3n)2 area

• Incremental construction at time t at most 3 bends per edge at most 3t-1 total bends at most 2.25t2 area

Page 24: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Orthogonal Graph Drawings

• Under the No-Change Scenario…– New vertex v must be placed “outside”

existing drawing– Again placed to minimise rows, columns and

bends

• Incremental construction at time t at most 3 bends per edge at most 8t/3+2 total bends at most (4t/3)2 area

Page 25: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Orthogonal Graph Drawings

Relative

Page 26: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Four-Orthogonal

• Assumes a biconnected graph, degree 4

1. Calculate st-ordering2. Place first vertex3. Allocate columns for out-going edges4. Place next vertex, using columns for in-

coming edges5. Repeat from 3 until done

Page 27: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Four-Orthogonal

Page 28: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Four-Orthogonal

• Classify vertices a-b by in-coming a and out-going b edges s.t. 1 a, b, a+b 4

• Condensed G’ 1-1 vertices absorbed• Form vertex pairs then use to identify

vertices and edges which can share rows and columns

Page 29: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Four-Orthogonal

1. Computer st-numbering of G2. Condense G to G’ – update numbering3. i = n’-1; while i > 2:

– If vi 1-21-3 then pair vi-1,vi; i = i-2– Elseif vi 2-2 then find smallest j s.t.

vi-j 1-12-13-1 or vi-j immediate predecessor vi; pair vi-j,vi; i = i-j-1

– Else i = i-1• Finds pairs for all 1-21-32-2 vertices

Page 30: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Four-Orthogonal

vi 2-2 and vj 2-2

Page 31: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Four-Orthogonal

vi 2-2 and vj 1-12-13-1 ( predecessor)

Page 32: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Four-Orthogonal

vi 2-2 and vj 1-21-3

Page 33: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Four-Orthogonal

vi 1-21-3 and vi-1 2-22-13-1

• Covered by vi 2-2 cases

vi 1-21-3 and vi-1 1-21-3 (independent)

Page 34: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Four-Orthogonal

vi 1-21-3 and vi-1 1-21-3 (predecessor)

• vj pred vi 1-21-32-2*, and

• (vi-1, vi) has not absorbed 1-1 vertices

Page 35: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Four-Orthogonal

vi 1-21-3 and vi-1 1-21-3 (predecessor)

• vj pred vi 1-21-32-2*, or

• (vi-1, vi) has absorbed 1-1 vertices

Page 36: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Four-Orthogonal

1. st-number, condense and find pairs2. Place v1 and v2 (see next slide)

3. For v3 … vn’-1:– If vi unplaced:

• Place unpaired vi in new row with new columns

• Place paired vi,vj as shown

4. Place vn’ in new row (4th edge from vn’-1)5. Replace absorbed 1-1 vertices

Page 37: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Four-Orthogonal

• Placing v1 and v2

Page 38: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Four-Orthogonal

Page 39: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

Four-Orthogonal

• Running time O(n)• Area O( (7n+10)2 / 64) O(0.77n2)• At most 2n+4 bends in total• At most 2 bends per edge

Page 40: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

References

• R. F. Cohen, G. Di Battista, R. Tamassia, I. G. Tollis (1995): “Dynamic Graph Drawings: Trees, Series-Parallel Digraphs, and Planar st-Digraphs”, SIAM J. Computing, 24(5):970-1001.

• K. Misue, P. Eades, Wei Lai, K. Sugiyama (1995): “Layout Adjustment and the Mental Map”, J. Visual Languages and Computing, 6(2):183-210.

• M. L. Huang, P. Eades, J. Wang (1998): “On-line Animated Visualization of Huge Graphs using a Modified Spring Algorithm”, J. Visual Languages and Computing, 9(6):623-645.

Page 41: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

References

• Wei Lai (1993): “Building Interactive Diagram Applications”, Ph.D. Thesis, Dept. Computer Science, University of Newcastle.

• C. Demetrescu, G. Di Battista, I. Finocchi, G. Liotta, M. Patrignani, M. Pizzonia (2000): “Infinite Trees and the Future”, Proc. 7th Int. Symp. Graph Drawing (1999), Springer-Verlag, LNCS, 1731:379-391.

Page 42: COMP4048 Incremental Graph Drawing Richard Webber National ICT Australia.

References

• A. Papakostas, I. G. Tollis (1998): “Interactive Orthogonal Graph Drawing”, IEEE Trans. Computers, 47(11):1297-1309.

• A. Papakostas, J. M. Six, I. G. Tollis (1997) “Experimental and Theoretical Results in Interactive Orthogonal Graph Drawing”, Proc. 4th Int, Symp. Graph Drawing (1996), Springer-Verlag, LNCS, 1190:371-386.