Graphics Reference
In-Depth Information
nodes and six edges represented in four different ways. In the left diagram,
all the nodes are evenly spread out around the perimeter, but two links are
crossed.Theseconddiagram hasnocrossedlinks, butthenodeinthecenter
of the triangle perceptually is different than the ones around the edges,
leadingtoapotentiallyerroneousconclusionthatthecenternodehashigher
centrality than the others. The third diagram has all the nodes in a line,
but two are centered and two are at the ends. The final diagram shows a
completelydifferentrepresentationusingfilledareastorepresentnodesand
a shared boundary between areas to represent an edge.
Figure 4-6: This shows the same graph drawn four different ways. All
nodes have the same number of connections but appear differently relative
to their neighbors in the right three graphs.
Force-Directed Layout
A highly popular technique used to lay out graphs is a force-directed
layout . The approach is appealing because it seems intuitive, can work on
most any type of graph, and can work for large-sized graphs. The approach
essentially pulls together nodes that are connected and may push apart
nodes that are not connected.
This is sometimes called a “spring” layout. In other words, links are
considered as springs, and the springs will stretch and compress if needed
but have a set size when they are at rest. Typically, all the nodes and springs
start in a random layout, and the springs are recomputed iteratively until
the forces cancel each other out.
Force-directed layouts are popular because of the intuitive outcome—nodes
that are far away from each other are likely many steps away from each
other, and nodes that are physically close to each other are likely only
a step or two away from each other. Figure 4-7 shows an example of a
force-directed layout applied to a channel-flipping data set. This is data
 
 
Search WWH ::




Custom Search