Layout quality
Every library of the list drew the same six graphs, 3 times each. When a drawing stopped changing, or after 30 seconds, we read where the library had put the nodes and measured the layout. Of the runs, the one with the median distance error is shown. The pictures are drawn from these positions, all in the same way: they show the layout of a library, not its style. A picture leads to the live demo.
What the numbers mean
All of them look only at where the nodes are. A link is taken as a straight line between its two nodes, also for the libraries that draw links bent or curved.
What they do not say
- The numbers are about the demos of this website: one layout of a library, with the settings of its demo. Many libraries have other layouts and settings, and some of them would do better here.
- dagre, elkjs, viz-js and msagljs draw a graph in layers. They are made for hierarchies and flows, where the direction of a link matters, and a small distance error is not what they aim for.
- 3d-force-graph lays a graph out in space. Distances are easier to keep there than on a plane, so its numbers do not compare with the others. Its picture shows the layout from the side that shows the most of it.
- A layout with good numbers is not always the picture you want. Labels, sizes of nodes, the routes of links and symmetry are not measured, and the graphs are small.
Tools that are not on the list
The list has libraries that run in a browser tab and that we can keep a copy of. Other tools can be measured too: they lay out the same graphs on somebody's computer, and only the positions of the nodes come here. They get the same numbers and the same pictures, and they are shown under the libraries.
To add a tool, lay out the graphs (JSON, DOT and GraphML) and send the positions: how the files look.
Reading
- T. Kamada, S. Kawai. An algorithm for drawing general undirected graphs. Information Processing Letters, 1989.
- E. Gansner, Y. Koren, S. North. Graph drawing by stress majorization. Graph Drawing, 2004.
- H. Purchase. Metrics for graph drawing aesthetics. Journal of Visual Languages and Computing, 2002.
- J. Kruiger and others. Graph layouts by t-SNE. Computer Graphics Forum, 2017.
The numbers are in quality.json, the code that computes them is layoutQuality.js.