paulbrodersen / netgraph

Publication-quality network visualisations in python
GNU General Public License v3.0
690 stars 40 forks source link

Orthogonal layout #16

Open samiit opened 5 years ago

samiit commented 5 years ago

Is there any way to render the network graph with orthogonal layout?

paulbrodersen commented 5 years ago
  1. What is an orthogonal layout?

  2. To answer your question: no, the only layout algorithm that I have implemented for the time being is Fruchtermann-Reingold. I do have plans to add more layout algorithms, so I am open to suggestions.

paulbrodersen commented 5 years ago

Is this what you are referring to?

samiit commented 5 years ago

Sorry @paulbrodersen for being ambiguous. I meant "orthogonal edge routing", something that is available in graphviz. The paper you pointed to is one of the latest contributions (thanks for sharing), but there have been attempts earlier (like, HOLA, and others).

paulbrodersen commented 5 years ago

I cannot find a standalone python implementation and I would rather not make graphviz a dependency of the project. If you have an implementation handy, I am open to working on integrating it into the module. Otherwise, it will go onto list of planned features but won't be implemented any time soon.

samiit commented 5 years ago

Thanks for considering the request. I found an alternative in grandalf, specifically, its SugiyamaLayout, which did pretty much what I wanted.

paulbrodersen commented 5 years ago

The SugiyamaLayout is more akin to neato layout in graphviz, though, not the layout proposed in the HOLA paper -- isn't it?

samiit commented 5 years ago

Not sure about the neato layout, but surely it is far from the HOLA paper.

I did get some headway when I found the SnapPy project and found this code there. But I couldn't put it to good use, but am sure someone else can figure out what to do. Some classes that interested me (and may be you, if you would like to implement it in netgraph) would be OrthogonalRep, OrthogonalLinkDiagram, etc.

paulbrodersen commented 5 years ago

Thanks for the link, that is useful.