As you can see, nodes are rectangles. They have a position and size
(width is same, height vary). I need to arrange
them neatly. The easiest way I can describe the solution is.
1. Create a list of all nodes in the graph.
2. Store their position and size.
3. Create a list of edges.
4. Pass above information to a function.
5. Get back new positions of the nodes.
So we something in networkx that can help me out here?
Prashant
Python 2.6.2
XP 32
I think when you say "arrange them neatly" you probably want an
algorithm that minimizes the edge crossings. Take a look
at the examples of the Graphviz layout algorithms (see
http://graphviz.org/Gallery.php
)
If some of those work you could generate layouts from Python with
PyGraphviz.
Aric