Question

I have a large directed acyclic graph that I would like to visualize in a bitmap image.

Ideally I'd like to have all the root nodes at the top of the image, and all of the leaf nodes at the bottom, i.e. the graph edges are all pointing in a downwards direction.

Is there a good algorithm for working out the coordinates of all the nodes that meets these constraints and will produce a good visualization?

Was it helpful?

Solution

I advise you to use Gephi.

This soft is able to do all the things you want to, especially graph layouts !

OTHER TIPS

Look at the Graphviz software collection. It contains several programs to render graphs.

The most simple way is to write your graph to disk, in one of Graphviz's text formats. Then execute one of the render programs, and load the resulting image into your application.

Bayesian Networks have similar requirements. You might look for algorithms for Bayesian Networks. This paper for example might be helpful.

You might be interested in layered graph drawing (also known as "hierarchical graph drawing" or "Sugiyama-style graph drawing"). The algorithm is too long to describe here, but Google searches bring up many reliable explanations.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top