Paradigms for Graph Drawing - PowerPoint PPT Presentation

About This Presentation
Title:

Paradigms for Graph Drawing

Description:

Even if they don't, it is often difficult to deal with all of them at the same time ... subgraph of the given graph ... Then apply the hierarchical approach ... – PowerPoint PPT presentation

Number of Views:129
Avg rating:3.0/5.0
Slides: 57
Provided by: Lia89
Category:

less

Transcript and Presenter's Notes

Title: Paradigms for Graph Drawing


1
Paradigms for Graph Drawing
Graph Drawing Algorithms for the Visualization
of Graphs - Chapter 2
Presented by Liana Diesendruck
2
Graph Drawing Methods Parameters
  • Input graph G E(G) and V(G)?
  • Additional input class of G - like planar,
    directed acyclic, tree, etc.
  • Specific algorithms work better for specific type
    of graphs
  • Highlight a particular graph characteristic

3
Graph Drawing Methods Concepts
  • Drawing convention ???? (basic rule that the
    drawing must satisfy to be admissible)?
  • Aesthetics - ???????
  • Constraints - ???????

4
Graph Drawing Methods Concepts
  • Drawing conventions
  • Polyline drawing
  • Straight-line drawing
  • Orthogonal drawing
  • Grid drawing
  • Planar drawing
  • Upward drawing

5
Graph Drawing Methods Concepts
  • Polyline drawing each edge is drawn as a
    polygonal chain
  • Can approximate drawings with curved edges

6
Graph Drawing Methods Concepts
  • Straight-line drawing each line is drawn as a
    straight line
  • Particular case of polyline drawing

7
Graph Drawing Methods Concepts
  • Orthogonal drawing each edge is drawn as a
    polygonal chain of alternating horizontal and
    vertical segments
  • Particular case of polyline drawing

8
Graph Drawing Methods Concepts
  • Grid drawing vertices, crossings, and edge bends
    have integer coordinates

9
Graph Drawing Methods Concepts
  • Planar Drawing no edge crossings

10
Graph Drawing Methods Concepts
  • Upward Drawing each edge is drawn as a curve
    monotonically nondecreasing in the vertical
    direction.
  • Directed Acyclic Graphs
  • Strictly upward

11
Graph Drawing Methods Concepts
  • Aesthetics specify graphic properties we would
    want to apply as much as possible to achieve
    readability.
  • Crossings
  • Area
  • Total / Maximum / Uniform Edge Length
  • Total / Maximum / Uniform Bends
  • Angular resolution
  • Aspect Ratio
  • Symmetry

12
Graph Drawing Methods Concepts
  • Crossings minimization of the total number of
    crossings.
  • Ideally we would have planar graphs (not always
    possible).

13
Graph Drawing Methods Concepts
  • Area minimization of the area of the drawing.
  • Important to save screen space
  • Relevant just when we cannot arbitrarily scale
    the graph down

14
Graph Drawing Methods Concepts
  • Total Edge Length minimization of the sum of the
    lengths of the edges.
  • Maximum Edge Length minimization of the maximum
    length of an edge.
  • Both relevant just when we cannot arbitrarily
    scale the graph down.
  • Uniform Edge Length minimization of the variance
    of the lengths of the edges.

15
Graph Drawing Methods Concepts
  • Total Bends minimization of the total number of
    bends along the edges.
  • Important for orthogonal drawings
  • Trivially satisfied by straight-line drawings
  • Maximum Bends minimization of the maximum number
    of bends on an edge.
  • Uniform Bends minimization of variance of the
    number of bends on an edge.

16
Graph Drawing Methods Concepts
  • Angular resolution Maximization of the smallest
    angle between two edges incident on the same
    vertex.

17
Graph Drawing Methods Concepts
  • Aspect Ratio minimization of the aspect ratio of
    the drawing

L2
A.R. L2/L1
L1
18
Graph Drawing Methods Concepts
  • Symmetrydisplay the symmetries of the graph in
    the drawing

19
Graph Drawing Methods Concepts
  • Most aesthetics are associated with optimization
    problems most of them computationally hard.
  • Approximation strategies and heuristics for
    real-time response.

20
Graph Drawing Methods Concepts
  • Constraints refer to specific subgraphs and
    subdrawings. Commonly used in visualization
    applications. Usually include
  • Center place a given vertex close to the center
    of the drawing
  • External place a given vertex on the outer
    boundary of the drawing
  • Cluster place a subset of vertices close
    together
  • Left-right sequence draw a given path
    horizontally aligned from the left to the right
  • Shape draw a given subgraph with a predefined
    shape

21
Precedence Among Aesthetics
  • Most drawing techniques are based in the
    following two observations
  • Aesthetics often conflict with each other
  • Even if they don't, it is often difficult to deal
    with all of them at the same time

22
(No Transcript)
23
Precedence Among Aesthetics
  • Graph drawing methodologies established a
    precedence among aesthetics.
  • Such precedence is more suitable for certain
    applications than for others.
  • The common approaches to graph drawings usually
    divide the process into a sequence of steps.
  • Each step is targeted to satisfy a certain
    subclass of aesthetics.

24
Topology-Shape-Metrics Approach
  • Suited for orthogonal grid drawings
  • Topology two orthogonal drawings have the same
    topology if one can be obtained from the other by
    deformation that doesn't alter the sequence of
    edges contouring the faces of the drawing

25
Topology-Shape-Metrics Approach
  • Shape two orthogonal drawings have the same
    shape if one can be obtained from the other by
    modifying the lengths of the segments of the
    edges without changing their angles
  • Metrics two orthogonal drawings have the same
    metrics if they are congruent, up to a
    translation and/or rotation

26
Topology-Shape-Metrics Approach
  • The approach has 3 steps
  • Planarization
  • Orthogonalization
  • Compaction

27
Topology-Shape-Metrics Approach
  • Planarization (determines the topology)?
  • Try to reduce the number of edge crossings as
    much as possible
  • Possible algorithm
  • Extract the maximal planar subgraph of the given
    graph
  • Insert the non-planar edges one by one,
    minimizing the number of crossings caused at each
    insertion
  • Represent each crossing by a dummy vertex, so the
    final topology is planar

28
Topology-Shape-Metrics Approach
  • Orthogonalization (determines the shape)?
  • Outputs the orthogonal representation of the
    graph.
  • Each edge (u, v) is equipped with a list of
    angles, that describes the bends that the
    orthogonal line representing (u, v) will have in
    the final drawing

29
Topology-Shape-Metrics Approach
  • Compaction (determines the metrics)?
  • Determines the final coordinates of the vertices
    and of the edge bends
  • Try to minimize the drawing area
  • Dummy vertices are removed
  • Constraints
  • Topological edge crossings, fix a vertex in the
    external face of the drawing, etc.
  • Shape require that a given path doesn't have
    bends
  • Metrics constrain the relation between vertices
    coordinates

30
(No Transcript)
31
Hierarchical Approach
  • Suited for directed graphs, particularly for
    acyclic directed graphs with the polyline
    downward drawing convention.
  • Steps
  • Layer assignment
  • Crossing reduction
  • X-coordinate assignment

32
Hierarchical Approach
  • Layer assignment
  • Produce a layered directed graph with layers
  • If (u, v) is an edge where and
    , then i gt j
  • Produce a proper layered directed graph
  • If (u, v) is an edge where and
    , then i j1
  • Do it by inserting dummy vertices along edges
    that span more than two layers
  • Assign yi to every vertex in

33
Hierarchical Approach
  • Crossing reduction
  • Receive the proper layered graph
  • Order the vertices on each layer, so to minimize
    the amount of edge crossings
  • X-coordinate assignment
  • Preserve the order received on each layer
  • Assign x-coordinates to every vertex
  • Represent each edge by a straight line
  • Remove dummy vertices

34
(No Transcript)
35
Hierarchical Approach
  • Can also be used in graphs that are not acyclic
  • Cannot preserve the downward convention, but can
    minimize the amount of upward edges
  • First, force the graph to be acyclic by reversing
    a subset of edges (as small as possible)?
  • Then apply the hierarchical approach
  • Finally, restore the original direction of the
    reversed edges

36
(No Transcript)
37
Visibility Approach
  • Suited for drawing graphs with the polyline
    drawing convention
  • Steps
  • Planarization (as in the topology-shape-metrics
    approach)?
  • Visibility
  • Replacement

38
Visibility Approach
  • Visibility
  • Construct a visibility representation of the
    graph
  • Map each vertex to a horizontal segment
  • Map each edge to a vertical segment
  • s.t., the vertical segment (u,v) has endpoints on
    the horizontal segments representing u and v and
    does not intersect with any other horizontal
    segment

39
Visibility Approach
  • Replacement
  • Construct the final polyline
  • Replace each horizontal segment by a point
  • Replace each vertical segment by a polygonal
    line, following the original vertical assignment

40
(No Transcript)
41
Visibility Approach
  • Planarization step as in the topology-shape-metric
    s approach
  • Visibility step similar to layer assignment in
    the hierarchical approach
  • So, it can be considered as a meeting point of
    the topology-shape-metrics and the hierarchical
    approaches
  • Aesthetic considerations and general constraints
    can be added to suitable steps

42
Augmentation Approach
  • Also suited for the polyline drawing convention
  • Basic idea add edges and/or vertices to the
    graph to obtain a new graph with a stronger
    structure and better drawability properties
  • Steps
  • Planarization (as in the topology-shape-metrics
    approach)?
  • Augmentation
  • Triangulation drawing

43
Augmentation Approach
  • Augmentation
  • Add a set of edges (sometimes also vertices) to
    the planar embedding
  • s.t. a maximal planar graph is obtained (planar
    graph whose faces have three edges)?
  • Try to keep the degrees of the vertices as small
    as possible

44
Augmentation Approach
  • Triangulation drawing
  • Represent each face as a triangle
  • Remove dummy edges and vertices
  • Can use strategies to minimize the graph area,
    maximize angular resolution and uniform
    distribution of vertices

45
(No Transcript)
46
Augmentation Approach
  • If the graph is planar, then the result drawing
    is straight-line. Otherwise, the dummy vertices
    become bends.
  • This approach is less suitable than others for
    supporting constraints.

47
Force-directed Approach
  • Good for creating straight-line drawings of
    undirected graphs
  • Popular mostly because it is easy to understand
    and code
  • Simulates a system of forces over the input graph
    and outputs a locally minimum energy
    configuration
  • Two ingredients
  • Force model
  • Locally minimum configuration finding technique

48
Force-directed Approach
  • Example of a force model
  • Each pair (u,v) is assigned with a spring with
    length luv that is the number of edges on the
    shortest path between u and v. The spring follows
    Hooke's law.
  • Locally minimum configuration finding technique
  • Usually by numerical analysis (simple iterative
    methods)?
  • Tends to give highly symmetric drawings and
    distribute vertices evenly
  • Constrains can be added by special forces

49
Divide and Conquer Approach
  • Suited for graphs that can be easily decomposed
    into subgraphs, such as trees.
  • Main idea
  • split the graph into subgraphs
  • recursively draw the subgraphs
  • the drawing of the whole graph is obtained by
    gluing the drawings of the subgraphs.

50
Divide and Conquer Approach
  • Example algorithm for drawing binary trees in 2
    main steps
  • Layer assignment (as in the hierarchical
    approach), trying to minimize the distance from
    the root
  • Divide and Conquer
  • If the tree is a single vertex, then trivially
    construct its drawing on the assigned layer. If
    the tree is empty, do nothing.
  • Else, (divide) recursively divide the left and
    right subtrees and (conquer) place the two
    subdrawings obtained close to one another with
    the root positioned halfway between the roots of
    the subtrees.

51
General Framework for Graph Drawing
  • Let C be a class of graphs and let C' be a
    subclass of C. If an algorithm can be applied tp
    the graphs of C, it can also be applied to the
    graphs of C'. That is, C' inherits the algorithms
    for C.
  • Graph drawing methodology is composed of a series
    of relatively independent functional steps. Where
    the inputs and outputs are always graphs.

52
General Framework for Graph Drawing
  • Inheritance hierarchy of classes of graphs
  • Set of methods with the following
    characteristics
  • Each method is associated with a class of graphs
    and maps a graph of that class into a graph of
    another class
  • A method associated with a class of graphs C is
    also associated with all the descendant classes
    of C in the hierarchy.

53
General Framework for Graph Drawing
  • The most general class in the hierarchy is Graph
  • According to certain properties, the subclasses
    of Graph are
  • Connected Graphs
  • Planar Graphs
  • Directed Graphs
  • Drawing

54
(No Transcript)
55
(No Transcript)
56
Summary
  • Drawing conventions
  • Aesthetics
  • Constraints
  • Precedence among aesthetics
  • 6 different approaches to graph drawing
  • Hierarchy and inheritance
Write a Comment
User Comments (0)
About PowerShow.com