graph - Graphviz how to control the edges -
screenshot. looking graph on right getting graph on left. new graphviz. had make nodes 1 , 2 because not able imitate image on right. shapes of terminals aren't same. me this. code till now:
digraph m { style=filled; graph [splines = headport]; start->1 1->"is count\nan even\nnumber?" "is count\nan even\nnumber?"->"sum = sum +\ncount" [label=true] "sum = sum +\ncount"->2 "is count\nan even\nnumber?"->2 [label=false] 2->"count = count+1" "count = count+1"->"is count >\n20" "is count >\n20"->1 [label=false] "is count >\n20"->stop[label=true] "is count\nan even\nnumber?"[shape=diamond] "sum = sum +\ncount"[shape=rectangle] "is count >\n20"[shape=diamond] "count = count+1"[shape=rectangle] 1[shape=circle] 2[shape=circle] start[shape=record, style="rounded"] stop[shape=record, style="rounded"] }
i made few changes diagram closer. polylines splines , changed attributes of 1 , 2 nodes little closer goal. not perfect better enough , suggest other ways might improve further without major redesign.
digraph m { style=filled; graph [splines = headport splines=polyline]; start->1 1->"is count\nan even\nnumber?" "is count\nan even\nnumber?"->"sum = sum +\ncount" [label=true] "sum = sum +\ncount"->2 "is count\nan even\nnumber?"->2 [label=false] 2->"count = count+1" "count = count+1"->"is count >\n20" "is count >\n20"->1 [label=false tailport=e] "is count >\n20"->stop[label=true ] "is count\nan even\nnumber?"[shape=diamond] "sum = sum +\ncount"[shape=rectangle] "is count >\n20"[shape=diamond] "count = count+1"[shape=rectangle headport=n] 1[shape=point size="0,0" label=""] 2[shape=point size="0,0" label=""] start[shape=record, style="rounded"] stop[shape=record, style="rounded"] }
Comments
Post a Comment