xflr6 / graphviz

Simple Python interface for Graphviz
https://graphviz.readthedocs.io
MIT License
1.63k stars 211 forks source link

Double-headed arrow style? #144

Closed galenseilis closed 2 years ago

galenseilis commented 2 years ago

The following diagram was made with Graphviz. I wasn't able to reproduce the double-headed arrows, and I didn't see a solution in the Examples or the intro of the user guide.

https://semopy.com/files/example.png

How can I produce double-headed arrows as a style for edges?

xflr6 commented 2 years ago

See the exhaustive upstream Graphviz docs on available attributes (linked from Basic usage).

You are probably looking for the dir attribute:

In [1]: import graphviz
   ...: 
   ...: g = graphviz.Graph()
   ...: 
   ...: g.edge('A', 'B', dir='both')
   ...: g

spam

If you manage to reproduce the graph (and it has an openly licence) maybe we could add it to the examples, WDYT?

galenseilis commented 2 years ago

Perfect! That is exactly what I want. Even better, I appreciate you providing the exhaustive Graphviz docs on the available attributes. Wonderful.

xflr6 commented 2 years ago

Happy to help. :) Closing.