开发者

How to output huge dependency relationships diagram of Plone with Graphviz?

开发者 https://www.devze.com 2022-12-20 22:55 出处:网络
I wrote a tool for find dependency relationships behind a Python project.It is Gluttony.I run it on Plone, the result is impressive.I output the diagram with Networkx, and it looks like this:

I wrote a tool for find dependency relationships behind a Python project. It is Gluttony. I run it on Plone, the result is impressive. I output the diagram with Networkx, and it looks like this:

How to output huge dependency relationships diagram of Plone with Graphviz?

(source: googlecode.com)

(Gee! It looks like World of Goo!)

A mess! I didn't handle layout with Networkx. That's why it is a mess. The tool can output Graphviz format file. I tried to render the diagram with dot command. I use command like this:

dot -Kdot -Tpng -oplone plone.dot

I got a huge image after long running, but the result seems wrong. I can't see anything on the result image. It looks like a white paper, nothing on it. What's wrong? Is the diagram too big to render? What should I do for rendering such a huge complex diagram?

I can get correct result from other small diagram, like this one:

How to output huge dependency relationships diagram of Plone with Graphviz?

(source: googlecode.com)

Even a much bigger diagram can be rendered correctly, let's see the diagram of TurboGears2

I think it should be fun to see the dependency relationship of such monster project like Plone. Also it is useful for researching. Unfortunately, I can't output diagram correctly. Cold someone help me out? Thanks.

Here is the Graphviz format开发者_如何学C file of Plone: plone.dot


The command dot plone.dot -Tsvg > plone.svg renders this scalable vecor graphic:

alt text http://dl.dropbox.com/u/138632/plone.svg

I can open the .svg file fine in Inkscape and zoom in till 100%.


If you can produce an image: Graphviz tends to create huge files. Zoom in.

For me graphviz regularly crashes on your file. It seems to max out on 32 kPixels per side and your file would be larger, resulting in an integer overflow.

Try splitting the file up into multiple sub-graphs (Additional points for using graph algorithms for finding good separation points).

Update:

I threw up a quick script to split dot files. It's not perfect, but it works reasonable.

0

精彩评论

暂无评论...
验证码 换一张
取 消