系统:Windows 7 软件版本:Graphviz2.38
dot
语言效果图
对应dot代码
digraph test{
node [ fontname = "Microsoft YaHei", fontsize =60]
edge [ fontname = "Microsoft YaHei", fontsize =60] a [ label = "node1"]
b [ label = "node2"]
c [ label = "node3"]
a -> b [ label = "line1"]
a -> c [ label = "line2"] subgraph cluster_graph1{
node [ fontname = "Microsoft YaHei", fontsize =12]
edge [ fontname = "Microsoft YaHei", fontsize =12] d [ label = "node4"]
e [ label = "node5"]
f [ label = "node6"]
d -> e [ label = "line3"]
d -> f [ label = "line4"]
}
}
代码截图
dot 示例.gv -Tpng -o 示例.png
三个文件
digragh 名称{}
,最外层结构,指明输出图的名称[]
定义其属性->
是线定义的关键digragh
来定义,子图则使用subgraph来定义{}
将其中的内容包围起来node/edge
删除,看看效果