layout - chunhualiao/public-docs GitHub Wiki
ZGRViewer
ZGRViewer typically uses Sugiyama-style layered layout, also known as hierarchical layout or layered graph drawing. This layout is especially well-suited for:
- Directed graphs, such as ASTs and package dependency graphs.
- Displaying the root at the top and children below, with all edges pointing downward.
- Ensuring minimal edge crossings and uniform edge direction.
The Sugiyama algorithm consists of multiple steps:
- Layer assignment (nodes are assigned levels/layers based on dependencies).
- Crossing minimization (heuristics to reorder nodes to reduce edge crossings).
- Coordinate assignment (horizontal positioning).
This layout is commonly used in tools like Graphviz (dot
layout), ZGRViewer (which visualizes graphs in formats like GraphML or GML), and others where directional hierarchy is important.
If you're getting good results in ZGRViewer, it's almost certainly using this type of layout under the hood.
Tuplip
- Layout -> Hierarchical -> Sugiyama (closest)