This page follows the previous introduction to hierarchical edge bundling. It considers you understood what inputs you need and how to build a basic version. it aims to describe how we can improve it, to get the above figure. First, we remember the R code allowing to get the previous basic version:




The first thing we can play with is the tension of the connections. A tension of 0 means straight lines. A connection of 1 means maximal curvature: the connections follow the hierarchical structure of the network as much as they can. Let’s have a look to the effect of different values.


Then we can play with the colour and transparency of connections. We have seen how to pick up a unique color in the example above. We can also map a specific variable to it like we are used to do with ggplot2 (chart 1 and 2 below)! Another possibility is to make the color evolves along the trajectory: the ‘from’ and the ‘to’ have different color. This is useful if your connection is directed, and gives the nice effect figure 4.


Finally we can custom the points as well, like for a classic ggplot2 graphic. It is a good practice to make the color depends of the classification of the point, it allows to make the hierarchy more obvious. In the last example, I map a column to the size of the points!


Now we probably need a last step: adding labels to each point to give more insight to the figure!





Make a search



Leave a Reply

2 Comment threads
0 Thread replies
Most reacted comment
Hottest comment thread
2 Comment authors
Georgettejace Recent comment authors
newest oldest most voted
Notify of

Hello, I’m trying to understand what the ‘value’ column represents. Instead of taking an adjacency matrix, it seems that the ‘connections’ are composed of two columns of the connections between subgroups (nodes). I have created two columns as such and a third column (value) that has the strength of the connection between nodes (correlation value). However, I see that then another vertices file has to be created that also has a “value” column- is this value different from the other one? Or have I misunderstood and “value” cannot be the strength of connection but represents perhaps a distance from the… Read more »


I’m having trouble following where “group” comes from in the colour argument for geom_node_point.