views:

402

answers:

1

Hi,

I'm using graphviz (dot) to generate the graph you can see below. The node in the lower left corner (red ellipse) causes annoyance as its edges cross several edges of the adjacent node. Is there a way to restrain node placement to a certain area?

Thanks for your ideas

graph with edge crossing several other edges

+3  A: 

I'm not aware of any means by which to control the placement of individual nodes. It doesn't really make sense, because in order to do that you'd need to know what the final graph will look like, yet placing one node manually would then change how the rest of the graph is rendered.

I solved this problem by changing the order in which my nodes are defined in the .dot file, and tweaking the nodesep and ranksep attributes at the graph level. It's a process of refinement - tweaking a few things at a time until it looks right.

You might also render the graph as SVG, then import it into Visio (or another editor) and manually rearrange the nodes you're not happy with.

Winston Smith