-
-
Save danaoira/72d368cd271af821817e to your computer and use it in GitHub Desktop.
Simple Graphviz Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> from graphviz import Digraph | |
>>> cgv = Digraph(comment='CGV') | |
>>> cgv.note('A') | |
Traceback (most recent call last): | |
File "<pyshell#21>", line 1, in <module> | |
cgv.note('A') | |
AttributeError: 'Digraph' object has no attribute 'note' | |
>>> cgv.node('A') | |
>>> cgv.node('B') | |
>>> cgv.edge('A', 'B') | |
>>> cgv.format = 'dot' | |
>>> cgv.render() | |
'Digraph.gv.dot' | |
>>> cgv.render('digraph.gv.dot', view=True) | |
'digraph.gv.dot.dot' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
digraph { | |
graph [bb="0,0,54,108"]; | |
node [label="\N"]; | |
A [height=0.5, | |
pos="27,90", | |
width=0.75]; | |
B [height=0.5, | |
pos="27,18", | |
width=0.75]; | |
A -> B [pos="e,27,36.104 27,71.697 27,63.983 27,54.712 27,46.112"]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment