Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to avoid overlapping nodes in graphviz?

I am trying to draw a graph with many nodes and edges.

However, the graph is becoming too clumsy, with nodes and edges overlapping. I tried (unsuccessfully), the following, all or combinations of these.

size = "12.0, 20.0!";
margin  = 0.0;
len = 1.0;

I am using neato to generate a png file.

The size specification did not even seem to work.

Any tips will be appreciated.

like image 641
Masroor Avatar asked Nov 19 '12 04:11

Masroor


People also ask

Is it difficult to reposition nodes in GraphViz?

See Render Graphviz graphs directly in your posts Yep, repositioning nodes, edges, and clusters is often difficult. Each of the three has its own challenges.

How to remove node overlaps from a graph?

If the value converts to "false", and it is available, Prism, a proximity graph-based algorithm, is used to remove node overlaps. This can also be invoked explicitly with overlap=prism.

How to get rid of overlap in GraphViz?

If Prism is not available, or the version of Graphviz is earlier than 2.28, "overlap=false" uses a Voronoi-based technique. This can always be invoked explicitly with "overlap=voronoi". If overlap="scalexy", x and y are separately scaled to remove overlaps.

What is the difference between overlap=prism and overlap=false in GraphViz?

By default, overlap="prism" is equivalent to overlap="prism1000". Setting overlap="prism0" causes only the scaling phase to be run. If Prism is not available, or the version of Graphviz is earlier than 2.28, "overlap=false" uses a Voronoi-based technique. This can always be invoked explicitly with "overlap=voronoi".


1 Answers

Try using SFDP using graph [ overlap=false ].

like image 198
Augustin Avatar answered Sep 24 '22 13:09

Augustin