Relevance of Graph-Drawing Algorithms
to Graph-Based Interfaces
Bertrand Ibrahim,
Honitriniela Randriamparany, Hidenori Yoshizumi
Computer Science Department,
University of Geneva, Switzerland
{Bertrand.Ibrahim, Honitriniela.Randriamparany}@cui.unige.ch
Abstract
The visual interface plays a significant role in a visual programming
system. We therefore developed heuristics that improve the
readability of control- and data-flow diagrams with many hundreds,
and even thousands of nodes. In this paper, we study how the body
of research in graph drawing (GD) can be applied to an actual
graph-based interface.
1. Introduction
Many visual languages are based on directed graphs, mostly those
based on the control-flow and data-flow paradigms. Such graphs
can typically include many hundreds, if not thousands of nodes.
These visual languages require specialized graphical editors that
support the visual syntax of the language. Such graphical editors
have to be designed to be as unobtrusive as possible so as not to
slow down the designers using it, while preserving the readability
of the visual representation displayed.
In a project where we combine control- and data-flow [10], we are
thus faced with the problem of automating the drawing process
(deciding node placement and edge trajectory) as much as possible
without reducing the usability of the interactive tool. This implies
that nodes cannot be moved around automatically by the editor, and
that the edges connecting the various nodes should not overlap with
the nodes themselves, so as not to interfere with the readability of
the node contents.
2. Comparison of Graph-Drawing approaches
In many respects, the problem we were trying to solve falls in the
domain of graph layout, more specifically in the category of incremental
graph layout with orthogonal routing (see [6] and section 5.3
of [2] on orthogonal grid drawing), i.e. drawing graphs that are
incrementally updated, with the constraint that very little change
should occur as a consequence of a single update, and with edges
that are constrained to an orthogonal grid. However, most of the
body of research in graph layout (see [8]) focuses on the printing of
an already created graph and very little has been done about graphs
that are interactively created and modified. Nevertheless, the latter
approach, also called dynamic graph drawing [4][7][14] has seen
increasing interest in the last few years.
Initially, the research in orthogonal grid drawing was mainly motivated
by VLSI design. It has also been used for entity-relationship
diagrams [13] and data-flow diagrams [1]. In all these cases, the
research has mostly focused on the aspects of complexity and minimization
of area and number of bends rather than the readability
and usability for an interactive user [5][12]. Of course, one could
argue that minimizing the number of bends of the edges of a graph
should improve the overall readability of the graph, but this remains
to be proven.
The authors of [3] categorize orthogonal high degree graph drawing
into three main models: (1) an unlimited-growth model, such as visibility
representations, where nodes are enlarged as much as necessary
to allow all the edges to be straight lines, (2) planar orthogonal
drawings with equal vertex size, also known as the Kandinsky model,
where all nodes have the same square size, and (3) an limited-growth
model, where the size of a node is proportional to its degree
(number of edges connecting it to other nodes), that is, the node is
as large as it needs to be to accommodate the incident edges. All
these approaches require that edges be completely independent
from each other, requiring that they all use different ports to connect
to graph nodes. These approaches also assume that all the edges
connected to a new node are known when the new node is inserted,
and that the insertion of a new node usually implies having to
move many other nodes to "make room" for the edges connecting
this new node to existing nodes.
Given that our graphical editor was meant to be used to build specification
graphs from scratch during brainstorming sessions [9], we
considered that having a complete rearrangement of the graph layout
at each step of the editing would unacceptably disrupt the editing
process. Even a sporadic rearrangement of nodes was rejected
as unacceptable if it was not absolutely necessary. Moreover, since
edges are added to the graph one after the other, the routing of all
the existing edges should not be affected by the insertion of a new
edge. Another particularity of our situation is that nodes have a textual
content that occupies a fair amount of space, and that needs to
be at least partially visible at all times to allow the user to make
sense of the graph that is displayed. The grid step for nodes is therefore
much larger than for edges. All these considerations led us to
clearly separate the areas where edges can flow (gutters) from the
areas used by the nodes (meshes). Multiple edges can run in the
same gutter. To avoid overlaps, gutters are subdivided into channels
in which only a single edge can run. In some ways, this is similar
to the use of gutters in VLSI design to allow the flow of edges
connecting elements that are far apart from each other [15]. When
no node occupies it, a mesh may be traversed by a vertical and/or a
horizontal edge. In addition, we allow for edges with the same destination
node to meet at their destination, on the same port, thus not
requiring the node to be enlarged to accommodate many edges connecting
to it. Edge intersections are not meaningful, that is, their
presence doesn't mean that the edges are merging. The only place
where edges may merge is where they reach their destination node,
just before the arrowhead. Heuristics are used to select the gutters
and the channels for edges so as to minimize intersections and
bends. We also use rounded bends rather than the simple right angle
bends found in most graph drawing systems to increase the visual
contrast between an actual bend at the intersection of two segments
of the same edge and the accidental intersection of two different
edges. To our knowledge these various aspects of our approach
have never been considered before, probably because the constraints
we put on our system were never considered as imperative
by the graph drawing community.
Nevertheless, if we want to compare our approach [11] with the
other incremental orthogonal graph drawing approaches (see Fig.
1), we can say that our approach resembles the Kandinsky model
(planar orthogonal drawings with equal vertex size), except that we
consider nodes of rectangular shape, that we do not consider moving
nodes apart to make room for newly inserted edges, that nodes
can be placed arbitrarily by the user and that we let edges meet at
their destination, on the same port. In some ways, our using multiple
"channels" in the gutter areas, plus our connecting edges with
the same destination on the same port advantageously replaces the
more traditional techniques of moving nodes aside to make room
for edges and enlarging nodes to allow for more edge connections.
Fig. 1: Three drawings of the "star graph," (a) is produced by
our system, (b) is in the Kandinsky model
and (c) is in Biedl's et al. TSS (limited growth) model
References
- [1]
- C. Batini, E. Nardelli and R. Tamassia; "A Layout Algorithm
for Data-Flow Diagrams;" IEEE Transactions on Software
Engineering, Vol. SE-12 (4), 1986, pp 538-546.
- [2]
- Giuseppe Di Battista, Peter Eades, Roberto Tamassia and
Ioannis G. Tollis; "Algorithms For Drawing Graphs: An
Annotated Bibliography;" in Computational Geometry:
Theory and Applications 4:235-282 (1994). http://
www.cs.brown.edu/people/rt/gd-biblio.html
- [3]
- Therese C. Biedl, Brendan P. Madden and Ioannis G. Tollis;
"The Three-Phase Method: A Unified Approach to
Orthogonal Graph Drawing;" University of Texas at Dallas,
Computer Science department, Technical Report UTDCS-03-97,
25 pages, 1997. http://www.utdallas.edu/~tollis/papers/
3phase.ps
- [4]
- R. F. Cohen, G. Di Battista, R. Tamassia and I. G. Tollis; "A
Framework for Dynamic Graph Drawing;" Brown University,
Technical Report No. CS-92-34, August 1992.
- [5]
- Ulrich Fößmeier and Michael Kaufmann; "Drawing High
Degree Graphs with Low Bend Numbers;" University of
Tübingen, Wilhelm-Schickard-Institut, Technical Report
WSI-95-21, 21 pages, 1995. http://www-pr.informatik.uni-tuebingen.de/~mk/psfiles/kandinsky1-tr.ps.gz
- [6]
- Ulrich Fößmeier, Carsten Heß, and Michael Kaufmann; "On
Improving Orthogonal Drawings: The 4M-Algorithm;" in
Graph Drawing, proceedings of the 6th International
Symposium, GD'98, Montréal, Canada, August 1998. Lecture
Notes in Computer Science, Springer Verlag, 1998, 3-540-65473-9. http://www-pr.informatik.uni-tuebingen.de/~mk/
psfiles/gd98.ps.gz
- [7]
- A. Garg and R. Tamassia; "Advances in Graph Drawing;" In
Algorithms and Complexity (Proc. CIAC' 94), volume 778 of
Lecture Notes in Computer Science, pages 12-21. Springer-Verlag, 1994.
- [8]
- I. Herman, G. Melançon, M. S. Marshall; "Graph
Visualisation and Navigation in Information Visualisation;"
Centre for Mathematics and Computer Sciences (CWI),
Kruislaan 413, 1098 SJ, Amsterdam, The Netherlands. http://
www.cwi.nl/InfoVisu/Survey/StarGraphVisuInInfoVis.html
- [9]
- Bertrand Ibrahim;
"Software Engineering Techniques for
CAL;" Education & Computing, Vol 5, pp 215-222, Elsevier
Science Publishers, 1989. http://cui.unige.ch/eao/www/CBL.papers/EdComp1/EdComp1.compact.html.
- [10]
- Bertrand Ibrahim;
"Diagrammatic Representation of Data
Types and Data Manipulations in a Combined Data- and
Control-Flow Language;" In 1998 IEEE International
Symposium on Visual Languages, Halifax, Canada,
September 1998, pp. 262-269. http://cui.unige.ch/eao/www/papers/VL/98/paper.html.
- [11]
- Bertrand Ibrahim, Hidenori Yoshizumi;
"Solving the
Spaghetti Plate Syndrome in a Control-Flow Language with a
VLSI-Like Solution;" In 1999 IEEE International Symposium
on Visual Languages, Tokyo, Jspan, September 1999, pp. 202-203.
http://cui.unige.ch/eao/www/papers/VL/99/poster.html.
- [12]
- Achilleas Papakostas and Ioannis G. Tollis; "Orthogonal
Drawing of High Degree Graphs with Small Area and Few
Bends;" University of Texas at Dallas, Computer Science
department, Technical Report UTDCS-04-96, 26 pages, 1996.
http://www.utdallas.edu/~tollis/papers/highdegree.ps
- [13]
- D. Reiner et al.; "A Database Designer's Workbench;" in
Entity-Relationship Approach, ed. S. Spaccapietra, North-Holland, 1987, pp 347-360.
- [14]
- R. Tamassia; "Graph drawing;" In Jacob E. Goodman and
Joseph O'Rourke, editors, CRC Handbook of Discrete and
Computational Geometry; CRC Press, 1997. http://
www.cs.brown.edu/cgc/papers/t-gd-97.ps.gz
- [15]
- N. Togawa, M. Sato, and T. Ohtsuki; "Maple-opt: A
simultaneous technology mapping, placement, and global
routing algorithm for FPGAs with performance optimization;"
Proc. IEEE Asia and South Pacific Design Automation
Conference 1995 (ASP-DAC'95), pp. 319--327, 1995.
Site Hosting: Bronco