88 with open(
'%s.dot'%(name), mode=
"wt")
as file:
89 file.write(
'digraph step { \n'\
90 +
' concentrate=true;\n'\
92 +
' node [ shape=polygon, fontname=Helvetica ]\n'\
93 +
' edge [ fontname=Helvetica ]\n'
94 +
' %s [shape=Mdiamond]\n'%name)
97 last_step_hypoNodes=[]
99 for cfseq_list
in step_list:
101 step_connections = []
102 step_connections.extend(last_step_hypoNodes)
104 last_step_hypoNodes =[]
105 for cfseq
in cfseq_list:
106 file.write(
" %s[fillcolor=%s style=filled]\n"%(cfseq.sequenceCA.filterNode.Alg.name,
algColor(cfseq.sequenceCA.filterNode.Alg)))
107 step_connections.append(cfseq.sequenceCA.filterNode)
108 file.write(
'\n subgraph cluster_%s {\n'%(cfseq.sequenceCA.step.name)\
109 +
' concentrate=true;\n'
110 +
' node [color=white style=filled]\n'\
112 +
' color=lightgrey\n'\
113 +
' fontname=Helvetica\n'\
114 +
' label = %s\n'%(cfseq.sequenceCA.step.name))
117 cfseq_algs.append(cfseq.sequenceCA.filterNode)
119 if len(cfseq.sequenceCA.step.sequences)==0:
120 last_step_hypoNodes.append(cfseq.sequenceCA.filterNode)
122 for menuseq
in cfseq.sequenceCA.step.sequences:
123 cfseq_algs, all_hypos, last_step_hypoNodes = menuseq.buildDFDot(cfseq_algs,
129 if cfseq.sequenceCA.step.combo
is not None:
130 file.write(
" %s[color=%s]\n"%(cfseq.sequenceCA.step.combo.Alg.name,
algColor(cfseq.sequenceCA.step.combo.Alg)))
131 cfseq_algs.append(cfseq.sequenceCA.step.combo)
132 last_step_hypoNodes.append(cfseq.sequenceCA.step.combo)