一個畫圖神器,以后快速畫圖又有了一個新武器
圖一:
代碼:
digraph directed { edge [fontname=NSimSun]; { a -> b; a -> c -> d [color=red,penwidth=3.0]; c -> e; a -> d[color=blue,label = "rank增加"]; } }
圖二:
graph hmc_graph{ "hmc01" -- "test520" "test520" -- "lpar2" "test520" -- "lpar3" "hmc01" -- "test570" "test570" -- "aixtest01" "test570" -- "aixtest02" "test570" -- "aixtest03" "hmc01" -- "test510" "test510" -- "lpar1" }
使用前需下載Graphviz,此為官網:http://www.graphviz.org/Documentation.php
下載下來只需像上面一樣,幾行簡單的代碼就可以搞出一個效果圖來(你聽的沒錯,是寫代碼,不是用手畫),程序員專用,尤其適合寫程序流程圖,邏輯圖,這些畫起來要好久,實際邏輯很簡單的東西。