Monday, May 18, 2015

Graph Drawing with Neato




Neato is a program part of the Graphviz suite which generates undirected graphs. It uses a spring model as its layout strategy i.e an ideal spring is placed between every pair of nodes. The springs then pushes the nodes so that their geometric distance approximates their path distance in the graph.
We ran a serie of experiments to see if the produced layouts match PlantUML layouts or if it increases/decreases readability.
Here are some of the results we obtained :

Figure -1 Diagram A generated with PlantUML



Figure - 2 Diagram A generated with Neato

As you can see, neaoto's layout doesn't match the PlantUML output which is a surprise as PlantUML uses Graphviz to generate its diagrams and Neato is the 'undirected graph' module. Instead of having a quite linear graph like with PlantUML, Neato diagram occupies the space more homogeneously and produces a more readable layout. 
We then experimented with some more complex diagrams. The readability was still much better than with PlantUML.


Figure - 3 Diagram B generated with PlantUML

Figure -4 Diagram B generated with Neato

Thoughts

Knowing that PlantUML uses Graphviz as a basis, it should be possible to switch its layout algorithm to Neato without too much difficulties.
Even though Neato's layout algorithm produces more readable diagrams, a problem to address is the amount of component/edge on the view. When the diagram gets complex there is too much things going on and it is difficult for the human eye to understand what it is all about. It feels like it is not enough to work only on layout strategies, we should work on refactoring the diagram structure as well.

Link to the documentation : http://www.graphviz.org/pdf/neatoguide.pdf

No comments:

Post a Comment