Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making graph too large for sfdp

I was trying to visualize a large graph with sfdp. The graph has 5134 edges and 1735 nodes. When I try to generate the .png:

sfdp -x -Goverlap=scale -Tpng data.dot > data.png

I get this:

sfdp: graph is too large for cairo-renderer bitmaps. Scaling by 0.687429 to fit
sfdp: failure to create cairo surface: out of memory
Segmentation fault.

Probably the problem is that my nodes are not dots, because when I generate de .png without "-Goverlap=scale" there is no problem but the graph is unreadable.

There is something I can do? There is another tool that can do this?

like image 955
Andres Tiraboschi Avatar asked Nov 28 '25 01:11

Andres Tiraboschi


2 Answers

The following GraphViz interest group conversation implies that changing the "overlap" value to "prism" may solve your problem. Yifan Hu, one of the authors of dot, implies that prism is more memory efficient than scale.

http://comments.gmane.org/gmane.comp.video.graphviz/6925

so:

sfdp -x -Goverlap=prism -Tpng data.dot > data.png

If you aren't using the latest version of GraphViz, it may be worth updating it. More recent versions may be more memory efficient.

like image 95
codeMonkey Avatar answered Dec 01 '25 21:12

codeMonkey


dot -Tsvg 99winsert.gv -v > out.svg

try transform to svg and then transform svg to png

like image 30
suiwenfeng Avatar answered Dec 01 '25 23:12

suiwenfeng