Graphviz: Is it possible to firmly 'steer' the alignment of edges?
01:41 06 May 2026

I would like to do something akin to the London Underground map in a star system map in a game I am working on.

I'd like to be able to tell the layout engine that a node needs to be approximately in either the E,NE,N,NW,W,SW,S or SE direction, and have the engine 'jiggle' the map around to optimise the layout along those lines.

Using Graphviz circular layout engines, I have tried specifying all eight directions per node, using invisible nodes with dummy names where necessary (at a small scale circo and twopi engines seem to start with the 'E' node) and it works for a while but then the layout flips around and gets tangled up.

I was wondering if there's a way to more explicitly tell a GraphViz engine that the edge needs to run as close as possible to the specified direction, or if this is too much whether there is an alternative tool I might be able to use for this purpose?

graphviz diagram