PLANET - A Radial Layout Algorithm For Network Visualization
PLANET - A Radial Layout Algorithm For Network Visualization
PII: S0378-4371(19)31670-X
DOI: https://doi.org/10.1016/j.physa.2019.122948
Reference: PHYSA 122948
Please cite this article as: G. Huang, Y. Li, X. Tan et al., PLANET: A radial layout algorithm for
network visualization, Physica A (2019), doi: https://doi.org/10.1016/j.physa.2019.122948.
This is a PDF file of an article that has undergone enhancements after acceptance, such as the
addition of a cover page and metadata, and formatting for readability, but it is not yet the definitive
version of record. This version will undergo additional copyediting, typesetting and review before it
is published in its final form, but we are providing this version to give early visibility of the article.
Please note that, during the production process, errors may be discovered which could affect the
content, and all legal disclaimers that apply to the journal pertain.
Journal Pre-proof
Highlights
A parent-centric layout algorithm for networks (PLANET) is proposed
PLANET show clear hierarchical relationship without compromising
the clarity of the overall network structure
PLANET produces drawings of spanning trees with uniform node
distribution and minimum number of edge crossing
The time complexity of PLANET is O N ,which is relatively low
of
Users can adjust the node size and edge length of each layer as
needed with PLANET
e- p ro
Pr
al
urn
Jo
Journal Pre-proof
*Manuscript
Click here to view linked References
of
Ge Huanga , Yong Lib,∗, Xu Tanc,∗, Yuejin Tana , Xin Lua,d,e
a College of Systems Engineering, National University of Defense Technology, Changsha 410073, China
b College of Economic and Management, Changsha University, Changsha 410022, China
p ro
c School of Software Engineering, Shenzhen Institute of Information Technology, Shenzhen 518172, China
d School of Business, Central South University, Changsha 410083, China
e School of Mathematics and Big Data, Foshan University, Foshan 528000, China
Abstract
e-
Tree layouts are among the key approaches for network visualization, and are
of particular importance for exploring the hierarchical structure of networks.
However, visualizations of the overall network structure and its hierarchical
relationships can rarely be optimized simultaneously. This paper presents a
Pr
radial layout algorithm called PLANET that enables users to explore the network
structure from a root node, while maintaining readability. In order to distribute
the nodes evenly and minimize edge crossings, we define a list of angle assignment
rules for displaying child nodes which can automatically maximize the tunable
angles between parent and child nodes, and to uniformly divide the angles of child
nodes. Using these rules, the structural properties of the network such as hubs
can be properly conveyed, and the readability of nodes that are far from the root
can be guaranteed. Our experimental results show that PLANET is comparable
al
1. Introduction
citation networks and so on. The issue of how to efficiently browse, understand,
5 excavate and navigate a large amount of network structure data has become
pressing within the field of information science. As an important technique in the
study of complex networks, network visualization can clearly show the structure
∗ Correspondingauthor
Email addresses: stone [email protected] (Yong Li), tanxu [email protected] (Xu Tan)
of a network and its internal and external relationships by displaying the network
data graphically, thus assisting users in achieving a better understanding of the
complex network and system, and in excavating valuable information hidden in
of
10
the structure.
There are several important issues related to the study of network visualiza-
tion. The first is the presences of edge crossings in the graph, which directly
affect its readability. Minimizing the number of edge crossings is a common
p ro
15 optimization goal for many visualization algorithms [1, 2]. The second issue is
that the layout algorithm should be completed within a reasonable time. Most
popular layout algorithms encounter the problem of computational complexity
in the visualization of large networks; for example, the time complexity of the
force-directed method is O(N 3 ). Furthermore, although a layout algorithm
20 displays all of the nodes and edges in the drawing, it may be hard to recognize
the hierarchical structure from the results.
In planar graph visualization techniques, trees can be laid out properly on a
e-
plane with no edge crossings, in linear time. This can clearly reflect the intrinsic
hierarchy of the data and is straightforward to understand. For this reason,
25 several studies have extracted spanning trees from networks and visualized these
rather than the networks themselves [3, 4].
Pr
In this paper, we present a parent-centric layout algorithm for networks
(PLANET), a visualization technique that can help users to explore a network
by starting from a node and radially expanding this to the entire network. Our
30 approach involves transforming a graph into a spanning tree or a tree with
links, and using angle assignment rules for child nodes to produce drawings with
uniform node distribution and minimal edge crossings. We call this approach
PLANET, since each child node in the algorithm is represented in a polar system
centered at its parent node, in the same way as a planet revolving around a
al
35 fixed star while surrounded by its own satellites in a celestial system. PLANET
allows users to view associations or hierarchies of particular entities and makes
it easy to find the influence of a node in networks by making it as the root node,
which is useful for visualizing data that contains many links and highlighting
urn
2
Journal Pre-proof
directions for future work. Finally, we summarize the results and present a
55 conclusion in Section 6.
of
2. Related Work
Since the 1980s, there have been a number of studies of hierarchical structure
visualization in networks, which have been developed to describe how objects
p ro
are ranked and ordered together in an organization or system, such as the
60 evolution of natural species, management of computer file storage systems, etc.
[6]. These visualization methods include tree drawings, tree and link drawings
and treemaps. The Reingold-Tilford layout is one of the most well-known
tree drawing algorithms, which was designed for binary trees [7] and was later
extended to trees of any degree [8] (Fig. 1 (a)).
e-
Pr
65 Traditional tree layout algorithms usually place nodes from top to bottom or
from left to right, and although this is a simple and widely used method, the
urn
75 determines the ring in which the non-root node is located (Fig. 2(b)). Although
sibling nodes (child nodes of a given parent node) belong to the same ring, the
distance between these sibling nodes and the parent node are different. Pavlo et
al. extended the traditional radial layout by placing each node on an annulus
wedge centered on its own parent node rather than on a concentric ring centered
80 on the root node. This approach naturally reflected the self-similar structures of
tree branches, producing visually pleasing layouts (Fig. 2(c)) [5]. However, as
3
Journal Pre-proof
the tree grows higher, the annulus wedges of subsequent nodes quickly decrease
in size, remote edges may cross or become too short to see, and parent and child
nodes may overlap. To help users explore the network more effectively, Pavlo et
of
85 al. developed an interactive exploration tool in which users can change the layout
by selecting a new node as the root node. To visualize the hierarchical structure
of large networks, some researchers have studied high-dimensional radial layouts
using a three-dimensional tree [11] or a hyperbolic tree [12].
p ro
One of the problems with using a tree to represent a network is that it ignores
90 the other edges in the network, so a more common way to visualize a network
is to use a tree-and-link layout. After a spanning tree has been extracted from
the network, we can use tree layout techniques to display it, and then add the
rest of the edges. This method has been integrated in several popular network
visualization tools (e.g. [13, 14]).
95 Another approach to network visualization uses a treemap representation.
A treemap is a set of nested rectangles that visualize data with hierarchical
e-
relationships [15]. Nodes are represented as rectangles, where the sum of the
area of all rectangles represents the size of the whole system, and the size of each
small rectangle is proportional to a property of the node. This layout makes
100 full use of the layout space and does not cause overlap due to a large number of
Pr
nodes. However, since non-leaf nodes are implicitly represented by nested child
nodes within their parent node, it is hard for users to identify the hierarchical
structure in this approach.
3. Algorithm
105 We assume that the network G = (V, E) to be laid out is coded using an
al
adjacency matrix, with V and E the sets of nodes and edges, respectively.
PLANET produces a drawing of G based on a spanning tree rooted at s. The
major goals for the design of our algorithm are that the nodes should distributed
evenly in the drawing area, the number of edge crossings should be minimized,
urn
110 and that the hierarchical properties of the structure should be highlighted while
maintaining readability of the overall network.
optimize two or more [16]. In this work, we chose three aesthetic metrics (node
distribution, edge length and edge crossing), because they have a normalized
form and can be computed in a reasonable amount of time, to quantify the
120 performance of the developed network visualization algorithm.
Standard deviation of node distribution. A good layout strategy should make
full use of drawing space, enable nodes distribute evenly within maximum space.
To measure the uniformity of nodes, we calculated the standard deviation of
4
Journal Pre-proof
of
u n
u1 X
nd = t (si − s)2 , (1)
n i=1
where n is the number of sub-regions divided from drawing area, si is the number
p ro
of nodes in the ith region, s is the average number of nodes in all regions.
Coefficient of variance of edge length. Since uniform edge lengths is an
effective metric for measuring the aesthetic quality of a layout, the coefficient of
130 variance of edge length has been used to quantify this criterion in several studies
[17, 18]. The coefficient of variance of edge length is defined as
vP
u (le − lµ )2
u
lσ t e∈E
e-
cv = = , (2)
lµ |E| · lµ 2
where lσ is the standard deviation of edge lengths and lµ is the average edge
length.
Pr
Number of edge crossing. In graph theory, an edge crossing occurs when
135 either two edges cross at a single point or when two edges overlap, fewer crossing
number of a graph makes it easier for people to understand the drawing. We
counted the number of edge crossings in different graph to measure this metric.
140
the iteration phase, we extract a spanning tree from the network using breadth-
first search (BFS) approach and place all descendant nodes of the root according
to the depth of the nodes in the tree. Firstly, we place the n0 child nodes of the
root node uniformly at random on a circle with radius r and centered at the
urn
145 root node, which we call the first level. Then, the descendant nodes of n0 are
placed uniformly at random on annulus wedges with radius rd and centered at
the parent of each node respectively, according to the proposed angle assignment
rules for child nodes.
node. In this way, the edges between parent and child nodes will never cross
or overlap, and all sibling nodes have the same edge length. In this way, the
hierarchical properties of the network are more clearly demonstrated. The
155 algorithm developed by Pavlo et al. [5] is based on similar ideas, but the remote
nodes and edges are not clearly displayed in these drawings. Using the angle
assignment rules for child nodes proposed in this paper, the available angular
range of each node will not exceed the angular range of its parent node, and the
5
Journal Pre-proof
length of an edge between nodes will not be influenced by the angular range of
160 the parent node (see Fig. 2). The angle assignment rules for the child nodes are
as follows.
of
Given a tree T = (V, E), with vertices V and edges E, the polar coordinate
of a node can be represented by (r, θ), the rectangular coordinate of a node can
be represented by (x, y) and these can be calculated by
p ro
x = r · cos θ,
(3)
y = r · sin θ.
165 We place the child nodes at coordinates radially as follows:
For each node v of tree T , let the coordinates of the root node (layer 0) be
(0, 0), and for each non-leaf node v, let (v1 , · · · , vn ) be v’s child nodes. The
parameter r in polar coordinates of each layer is some user-defined value, and
the parameter θ varies with the number of layers.
Layer 1 : Let the polar angle of the ith (i = 1, 2, · · · , n1 ) child node of v in
170
e-
the parent-centric model be
2(i − 1)π
θ1 = ,n1 6= 0, (4)
n1
Pr
2π
where the angle assigned to each child node is n1 .
θ2 = 2(i−1)π (5)
θ1 − fπ0 + (n2 −1)f0 otherwise,
2π
where the angle assigned to each child node is n2 f0 .
urn
Layer 3 and above: Let d be the depth of node v in the tree T , and let the
180 polar angle of the ith (i = 1, 2, · · · , nd ) child node of v be
θd−1 if nd = 1,
2(i−1)π
θd−1 + Q
m if θd−1 < θd−2 and nd 6= 1,
(nd −1) fk
k=0
θd = θd−1 − 2(i−1)π
if θd−1 > θd−2 and nd 6= 1, (6)
Jo
Q
m
(nd −1) fk
k=0
2(i−1)π
θd−1 − π
+ otherwise,
Q
m
fk (nd −1)
Q
m
fk
k=0 k=0
2π
where m = d − 2, and the angle assigned to each child node is Q
m .
nd fk
k=0
6
Journal Pre-proof
of
2煵/n
r
A A B A B
p ro
(a) (b) (c)
Fig. 2: The layout process in PLANET. In (a), starting from the positive axis,
the child nodes of the root node A are uniformly placed counterclockwise on the
ring, with A as the center and r as the radius. In (b), node B, one of child nodes
e-
of node A, is given the same angular space (light shading) as distributed in (a)
for its subtree. In (c), node C, one of three child nodes of node B, is assigned
one third of the angular space for its descendant nodes, as shown in the darker
shaded area.
Pr
3.4. layout algorithm
Given a network G, we first need to select a node as the root of the tree.
185 Although by default the node with highest degree is selected as the root, other
criteria are also applicable. We then use the BFS method to iteratively calculate
and record the polar coordinates of each node relative to the parent node, which
is then converted into absolute Cartesian coordinates.
In the following algorithm P LAN ET (G), G is an adjacent matrix of a
al
190 network, s is the root node, d is the depth of each node, r0 is the user-defined
edge length of the first layer and ξ is the user-defined constant for different
layers. adj[v] is the set of nodes adjacent to v after removing the visited node
from the network, and (XY (v)px , XY (v)py ) are the Cartesian coordinates of
urn
node v’s parent node. Enquene(Q, v) means add the set of nodes v to the queue
195 Q, while Dequene(Q) means remove the head element from the queue Q. The
result of the algorithm XY are the absolute Cartesian coordinates of all nodes
in the graph.
As each node in the queue Q is traversed and their coordinates calculated,
the overall time complexity of this method is O(N ), where N is the number of
200 nodes in the network. Hence, the computation time increases linearly with the
size of the network.
Jo
7
Journal Pre-proof
Algorithm 1 PLANET(G)
Input: G-an adjacent matrix of a network
Output: XY -the Cartesian coordinates of all nodes
of
1: //Initialization
2: XY (s) ← (0, 0)
3: d ← 0
4: r0 ← 1
p ro
5: Q ← adj(s)
6: //Iteration: calculate the coordinate of nodes on dth levels
7: while Q 6= ∅ do
8: d←d+1
9: rd ← r0 + (ξ · d)
10: if d=1 then
11: for each v ∈ Q do
//Calculate v’s polar coordinates relative to parent node
12:
e-
13: θ ←using formula 4
14: //Convert v’s polar coordinates to absolute Cartesian coordinates
15: XY (v) ← (x, y) ← (rd · cosθ, rd · sinθ)
16: m ← adj[v]
Pr
17: Enqueue(Q, m)
18: end for
19: else if d=2 then
20: for each v ∈ Q do
21: θ ←using formula 5
22: XY (v) ← (XY (v)px + rd · cosθ, XY (v)py + rd · sinθ)
23: m ← adj[v]
al
24: Enqueue(Q, m)
25: end for
26: else
27: for each v ∈ Q do
urn
4. Experimental Results
8
Journal Pre-proof
of
4.1. Spanning tree of random graph
210 We first describe an experiment which tests and compares both PLANET
and Pavlo et al.’s algorithm [5], using spanning trees extracted from randomly
generated graphs and with a randomly selected root node.
p ro
Fig. 3 shows the results of two drawings generated from the same tree. We
used a spanning tree with 50 nodes from a random graph with a height of six.
215 Pavlo et al.’s algorithm produces a symmetrical drawing. As the height of the
tree increases, the containment circle of remote descendants cannot be reduced
any further, and the descendant nodes cannot be displayed. As shown in the
dashed rectangles in Fig. 3(b), the parent and child nodes are squeezed together.
PLANET (Fig. 3(a)) produces a better graph in which the remote descendants
are displayed clearly. All of the edges in the figure are equal in this example,
220
e-
but the edge length can be set according to the user’s needs. The addition of
more layers of sub-nodes will not affect the readability of the graph.
Pr
al
urn
(a) (b)
Fig. 3: Two drawings of the same tree, using (a) PLANET and (b) Pavol et al.’s
layout algorithm
225 In this field, a radial layout works as a “target sociogram” and is used to explore
social networks from a single individual’s perspective. The placement of the
nodes in the radial layout makes it easy to discern how far and deep information
can travel from the root node. We tested the proposed algorithm using three
datasets and compared it with Pavlo et al.’s algorithm in the first two examples.
230 In the first example, we used a subset of a retweet network dataset from
Rossiand and Ahmed [19], which represents retweet relationships between Twitter
9
Journal Pre-proof
users and was collected from various social and political hashtags. We compare
the results of the spanning tree and the tree-and-link drawing of the retweet
network with those of Pavlo et al.’s algorithm. In Pavlo et al.’s algorithm, the
of
235 node’s angular space at the first level needs to be set manually, and the greater
the assignable angle, the more easily remote edges can cross. For comparison,
we set the assignable angle of the first level in Pavlo et al.’s algorithm the same
as that in our algorithm.
p ro
Fig. 4(a) and (b) show the comparative results for the spanning trees. All
240 nodes are visible and can be clearly in the results from PLANET, but in the
drawing produced using Pavlo et al.’s algorithm, some child nodes that are
further away from the root nodes overlap with the parent nodes, and some
remote edges are crossed. Without auxiliary rings, our algorithm looks clearer
and more esthetically pleasing.
245 By adding other edges to the network, a spanning tree drawing can be
transformed into a tree-and-link layout. The latter can show not only the
e-
hierarchical relationship in the tree, but also the non-inheritance relationship
between nodes in the network. Fig. 4(c) and (d) present comparative results for
the drawing of the tree-and-link scheme. We adjust the edge lengths and node
250 sizes in the tree-and-link layout in our algorithm, since suitable adjustments of
Pr
edge lengths and node sizes can make the topological features of the network
clearer. The node size represents the degree of the node, and the edge length
increases as the height of the tree increases. As shown in Fig. 4(c) and (d),
PLANET produces a satisfactory drawing that reflects the overall structure of
255 the network and the interaction between nodes of different levels, while Pavlo et
al.’s algorithm produces an untidier result due to the reduction in the length of
the remote edges.
al
urn
Jo
10
Journal Pre-proof
of
(a)
e- p ro (b)
Pr
al
(c) (d)
urn
et al.’s algorithm for this network. After the rest of the edges are added to the
spanning tree, the interaction between nodes at different levels can be observed,
and this is clearer in PLANET. As Fig. 5(a) shows, the leaf nodes that are
further from root node have weaker connections with non-leaf nodes. Moreover,
265 users can identify other important nodes from the graph produced by PLANET.
11
Journal Pre-proof
of
(a)
e- p ro (b)
Fig. 5: Graphs of the karate club network generated by (a) PLANET and (b)
Pavlo et al.’s algorithm
Pr
To test the performance of PLANET on weighted networks, we conducted
an experiment on a sawmill employee communication network and an ant colony
interaction network. The first dataset is collected from a small sawmill, the nodes
represent the employees in sawmill, including planer, mill, manager etc., and the
270 edges represent the communication relationship between employees [20]. If the
communication frequency between two employees exceeds a certain evaluation
al
level, there will be an edge between them in the communication network. The
network contains 36 nodes and 62 edges, and we assign a random weight to each
edge. Figure 6 is the result of communication network generated by PLANET,
275 where the black edge represents the edge of the spanning tree and the gray
urn
edge represents the rest edges. The thickness of the edge indicates the level of
communication frequency. The root node in figure 6(a) is a planer named Juan,
and the root node in figure 6(b) is the manager. Comparing the two figures, it
can be found that Juan is more likely to be the central person of the network
280 than the manager. The second dataset is one of the real-world ant interaction
networks collected from Israel [21]. The nodes represent ants in the ant colony
and edges represent interaction between ants in the colony. A pair of ants was
considered to interact when the front end of one ant was located within the
Jo
12
Journal Pre-proof
of
(a)
e- p ro (b)
13
Journal Pre-proof
of
300 comparable to Pavlo et al.’s algorithms.
1 2.5
p ro
Pavlo et al. Pavlo et al.
0.8 2
0.7
0.6
Time(sec)
1.5
0.5
0.4 1
0.3
0.2 0.5
0.1
0 0
500 1000 1500 2000 2500 3000 3500 4000 50 100 150 200 250 300 350 400 450 500
Number of nodes
e- Number of nodes
(a) (b)
70 16
Coefficient of variance of edge length
PLANET PLANET
60 14
Pavlo et al. Pavlo et al.
Pr
12
50
Edge crossings
10
40
8
30
6
20
4
10 2
0 0
50 100 150 200 250 300 350 400 450 500 50 100 150 200 250 300 350 400 450 500
Number of nodes Number of nodes
al
(c) (d)
generated from PLANET and Pavlo et al.’s algorithm. The size of sub-region is
0.1*0.1. PLANET achieves encouraging results compared to the Pavlo et al.’s
approach, which clearly demonstrates the effectiveness of the proposed angle
310 assignment rules. As shown in Fig. 8(c), coefficients of variance of edge length
of graphs generated by PLANET are much lower than Pavlo et al.’s approach.
Because the edge length of each layer can be set by user freely in PLANET (all
edge lengths are set to 1 in this example) and will have little influence on the
14
Journal Pre-proof
final layout, but in Pavlo et al.’s algorithm (the edge length of the first layer is
315 set to 1 in this example), it is inevitable for edge lengths decreased quickly (even
decreased to zero) with the number of layers increased. Fig. 8(d) shows numbers
of
of edge crossing of graphs produced by Planet and Pavlo et al.’s visualization
scheme. The nodes’ angular space at the first layer has been given a low value
to avoid edge cross for Pavlo et al.’s approach. As clearly shown in Figure 8(d),
320 our algorithm produce less crossings than Pavlo et al.’s approach.
p ro
5. Discussion
modified methods for angular space allocation could lead to a better result that
can avoid overlap between sibling nodes and edge crossing between edges, and
can improve the utilization of the drawing area. It is also natural to extend our
345 drawing methods to graph animation. The use of focus and context technology
and interactive interfaces would allow users to explore and understand the
network much more easily.
6. Conclusions
Jo
15
Journal Pre-proof
355 to compare PLANET with the algorithm developed by Pavlo et al., and the
results suggest that the quality of the layouts and the computational efficiency
of PLANET are satisfactory.
of
7. Acknowledgments
p ro
360 (71771213, 71522014, 91846301), XL and YT are supported by the Natural
Science Foundation of China (71790615, 71690233) and Hunan Science and
Technology Plan Project (2017RS3040, 2018JJ1034).
References
375 [5] A. Pavlo, C. Homan, J. Schull, A parent-centered radial layout algorithm for
interactive graph visualization and animation, arXiv preprint cs/0606007.
[6] P. Eades, A heuristic for graph drawing, Congressus numerantium 42 (1984)
urn
149–160.
[7] E. M. Reingold, J. S. Tilford, Tidier drawings of trees, IEEE Transactions
380 on software Engineering (2) (1981) 223–228.
[8] J. Q. Walker, A node-positioning algorithm for general trees, Software:
Practice and Experience 20 (7) (1990) 685–705.
[9] P. Eades, Drawing free trees, International Institute for Advanced Study of
Jo
16
Journal Pre-proof
of
Press/Addison-Wesley Publishing Co., 1995, pp. 401–408.
[13] P. Doemel, Webmap: a graphical hypertext navigation tool, Computer
395 Networks and ISDN Systems 28 (1-2) (1995) 85–97.
p ro
[14] D. Holten, Hierarchical edge bundles: Visualization of adjacency relations
in hierarchical data, IEEE Transactions on visualization and computer
graphics 12 (5) (2006) 741–748.
[15] I. Herman, M. S. Marshall, G. Melançon, D. J. Duke, M. Delest, J.-P.
400 Domenger, Skeletal images as visual cues in graph visualization, in: Data
Visualization99, Springer, 1999, pp. 13–22.
e-
[16] G. D. Battista, P. Eades, R. Tamassia, I. G. Tollis, Graph drawing: algo-
rithms for the visualization of graphs, Prentice Hall PTR, 1998.
[18] O.-H. Kwon, T. Crnovrsanin, K.-L. Ma, What would a graph look like in
this layout? a machine learning approach to large graph visualization, IEEE
transactions on visualization and computer graphics 24 (1) (2018) 478–488.
[19] R. Rossi, N. Ahmed, The network data repository with interactive graph
410 analytics and visualization., in: AAAI, Vol. 15, 2015, pp. 4292–4293.
al
415 fidelity is a key regulator of ant social organization, Science 340 (6136)
(2013) 1090–1093.
Jo
17