neato no-op flagΒΆ

The neato layout engine supports an additional rendering flag that allows more control over the node positoning and the edge layout via the pos, overlap, and splines attributes.

Use the neato_no_op keyword argugment of render() or pipe() to pass it to the layout command:

>>> doctest_mark_exe()

>>> import graphviz

>>> n = graphviz.Digraph(name='splines', engine='neato',
...                      graph_attr={'splines': 'true'},
...                      node_attr={'shape': 'point'})
>>> n.node('a', pos='0,0!', color='blue')
>>> n.node('b', pos='100,0!', color='green')
>>> n.node('c', pos='50,50!', color='red')
>>> n.edge('a', 'b', pos='0,0 30,66 70,60 100,0')
>>> n.render(neato_no_op=2, directory='doctest-output').replace('\\', '/')
'doctest-output/splines.gv.pdf'
_images/splines.svg