1. dot的hello world
root@ubuntu:~/test/dot# vi flow.dot ; 创建一个dot文件
digraph G {
hello -> world ;
}
root@ubuntu:~/test/dot# dot -Tpng flow.dot -o flow.png ;生成png
root@ubuntu:~/test/dot# eog ./flow.png ;预览一下
-
将hello外面的圈变为框度加入背景,在箭头上加入标签
root@ubuntu:~/test/dot# cat flow.dot
digraph G {
hello [shape=box];
world [style=filled, color="1,1,1"];
hello -> world [label="Yes"];
}
root@ubuntu:~/test/dot# dot -Tpng flow.dot -o flow.png ;生成png
root@ubuntu:~/test/dot# eog ./flow.png ;预览一下