netgraph icon indicating copy to clipboard operation
netgraph copied to clipboard

Orthogonal layout

Open samiit opened this issue 4 years ago • 8 comments

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

samiit avatar Oct 01 '19 10:10 samiit

  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 avatar Oct 01 '19 11:10 paulbrodersen

Is this what you are referring to?

paulbrodersen avatar Oct 01 '19 16:10 paulbrodersen

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).

samiit avatar Oct 02 '19 04:10 samiit

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.

paulbrodersen avatar Oct 02 '19 11:10 paulbrodersen

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

samiit avatar Oct 02 '19 13:10 samiit

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

paulbrodersen avatar Oct 02 '19 14:10 paulbrodersen

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.

samiit avatar Oct 03 '19 05:10 samiit

Thanks for the link, that is useful.

paulbrodersen avatar Oct 03 '19 15:10 paulbrodersen