抄了半个大致模板 自己研究了研究了研究,现在先会画流程图 改日详细填坑
from graphviz import Digraph
from graphviz import Source
dot = Digraph(
name='try1',
comment='',
filename=None,
directory=None,
format="png",
engine=None,
encoding='utf8',
graph_attr={'rankdir':'TB'},
node_attr={'color':'black','fontcolor':'black','fontname':'FangSong','fontsize':'12','style':'rounded','shape':'box'},
edge_attr={'color':'red','fontcolor':'#888888','fontsize':'10','fontname':'FangSong'},
body=None,
strict=False
)
dot.node('A','A-----',shape = 'rectangle')
dot.node('B','B=====',shape = 'circle')
dot.node('C', 'C-----',shape = 'triangle', color = 'blue', fontcolor = 'green')
dot.node('D','D=====',shape = 'circle')
dot.view()
'try1.gv.png'
dot.edge('A','B','E GAY WOLY GIAO')
dot.edge('A','D','ss')
dot.edge('D','C')
dot.edge('C','A')
dot.edge('C','D')
dot.view()
'try1.gv.png'