Edge drawing order

I’m trying to create a graph with certain edges on top of others based on a given value.

I want the yellow edges to be on top, but it seems like the drawing order is determined by the order of the nodes.
I’ve already tried ordering the edge definition based on the drawing order, but that did not affect anything. Is it possible to somehow influence the order in which edges are drawn so that certain edges are always on top?
(Basically what I’m trying to do, is create a graph with several coloured “layers”, with certain colours always being above others. For instance, all yellows are at the top, oranges below that, and so on.)

I haven’t tried this yet, but the outputorder graph attribute set to nodesfirst should help. That and ordering the nodes by color.

Neato has an option of leaving node position info untouched and just laying out edges. So you could try:

  • use dot to provide an initial complete layout, as you have now, but output in DOT format.
  • use gvpr to split the layout into 3 graphs: nodes with position, black edges, yellow edges.
  • use neato to relayout the black edges and the pre-positioned nodes.
  • finally use neato to layout the yellow edges and generate desired output format.

Detailed procedure is left to the reader … :wink:

Thank you, I’ll try that.