范例入门
1. 工作流
digraph d { edge[color=red, arrowhead=vee, fontcolor=gray]; node[style=filled, color=gray, fontcolor=dodgerblue2, shape=box] a[shape=box, label=" 电灯不工作了"]; b[label=" 电源 接好了吗?", shape=diamond]; d[label=" 灯泡 烧毁了吗?", shape=diamond]; e[label=" 更换灯泡", rank=same]; c[label=" 接好电源"]; f[label=" 修理电灯"]; // b,c; d f;水平排列 { rank=same b c} { rank=same d f} a -> b; b -> d[label=" 是"]; d -> e[label=" 是"]; b -> c[label=" 否"]; d -> f[label=" 否"]; }
2. UML
digraph c{ node[shape=record, rankdir=RL] // {rank=same Rental Customer} rankdir=LR Movie[label="Moviem|priceCode: intl| ", ]; Rental[label="Rentalm|daysRented: intl|"]; Customer[label="Customerm| |statement()l"]; // {rank=same Movie Rental Customer} Movie -> Rental[dir=back, label="1"]; Rental -> Customer[dir=back, label="2"]; }