Message Boards Message Boards


What does GraphLayout -> {"EdgeLayout" -> "HierarchicalEdgeBundling"} do?

Posted 5 years ago
1 Reply
2 Total Likes

The documentation mentions three values for the "EdgeLayout" suboption of GraphLayout, one of which is "HierarchicalEdgeBundling".

Does anyone know what this does and how we can use it?

The following seems to have no effect:

g = ExampleData[{"NetworkGraph", "DolphinSocialNetwork"}];
 GraphLayout -> {"VertexLayout" -> "CircularEmbedding", 
   "EdgeLayout" -> "HierarchicalEdgeBundling"}]

Googling for hierarchical edge bundling gives very interesting pictures though. Can we actually have something like this visualization in Mathematica using this option?

Hierarchical edge bundling

Link to SE semi-cross-post

This was solved over at SE (see link in question).

I committed a basic error and didn't show how I tried to use the option. The key is not to use a VertexLayout option at the same time.

This works:

g = ExampleData[{"NetworkGraph", "DolphinSocialNetwork"}]
Graph[g, GraphLayout -> {"EdgeLayout" -> "HierarchicalEdgeBundling"}]

enter image description here

This does not work:

Graph[g, GraphLayout -> {"VertexLayout" -> "CircularEmbedding", 
   "EdgeLayout" -> "HierarchicalEdgeBundling"}]

The "HierarchicalEdgeBundling" edge layout seems to automatically imply a certain vertex layout (and ordering) as well.

This can make very pretty images, I do wonder why it's never shown in the documentation. I tried to figure out this option several times during the past few years, and I never managed to get it to work because every time I made the same mistake: I also specified a vertex layout.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract