Pages

Saturday 24 July 2010

Graphviz Examples/推薦好軟體

Graphviz Examples/推薦好軟體


To draw above graph, all you need is to create this following text file/要畫上面那個圖,只要這樣寫:
digraph zeng {
ifZengRite [shape=diamond, label="曾志朗有禮?" ]
ifRefPunishZeng [shape=diamond, label="裁判處罰曾?" ]

gaoWrong [shape=box, label="高知遠無理" ]
refWrong [shape=box, label="裁判無理" ]
refCorr [shape=box, label="被亞洲跆拳道聯盟糾正"]
gaoRight [shape=box, label="高知遠有理"]
{rank=same; gaoWrong refWrong gaoRight}

tkdBad [shape=box, label="跆拳道人謀不臧"]

ifZengRite -> ifRefPunishZeng [color=red]
ifZengRite -> gaoWrong [color=green]
gaoWrong -> tkdBad

ifRefPunishZeng -> refCorr [color=red]
ifRefPunishZeng -> gaoRight [color=green]

refCorr -> refWrong -> tkdBad
refWrong -> gaoRight
}

Save the file as zeng.gv
存檔為 zeng.gv

Then convert the code to a gif file/然後用以下指令將程式轉成gif圖檔:

$ dot -T gif -o zeng.gif zeng.gv

Download Site/下載網站:http://www.graphviz.org/

延伸閱讀:
認識高知遠

free counters

No comments:

Post a Comment

Related Posts with Thumbnails

Popular Posts (All Time)/滿堂紅

Popular Posts (7 Days)/七日紅