说明:上传后图片和排版丢失,完整内容见pdf
pdf: hhttps://download.csdn.net/download/taotaoyouarebaby/9961643
3 graphViz3
3.1 无向图.4
3.2 带标签加权无向图.4
3.3 有向图.5
3.3.1 画图引擎.5
3.4 标注路径.5
3.5 子图. 6
3.6 大型图形:rank=same对齐.7
3.7 UML元素.8
3.7.1 node[..],edge[..]设置节点、连线属性.9
3.7.2 node[shape=”record”]9
3.7.3 类表示:AnimalClass9
3.7.4 继承关系:edge[arrowhead= "empty"]10
3.7.5 N:M关系:edge[arrowhead=”none”,headlabel=””,taillabel=””]10
3.7.6 包:使用子图实现subgraph clusterxxx {} 111 graphViz
参考:http://graphs.grevian.org/example
1.1 无向图
graph { rankdir=LR a -- b; a -- c; a -- e;
b -- c; e -- c;
c -- d; } |
说明:
Ø --: 无向图连线,可指定 节点集合 到 节点集合的连线,实现批量指定连线。
Ø rankdir=LR:指定图形排布方式,TB:从上到下,BT:从下到上;LR:从左到右;RL:从右到左。默认为TB
Ø 位置:图形和连线出现的位置与图形元素的声明顺序有关
1.2 带标签加权无向图
graph { rankdir=LR a [label="start",color=red,style=filled] d [label |