安装及基本使用:graphviz基本使用及常见问题_贾世鑫的博客-CSDN博客_graphviz
命令:
脚本:graph.dot
digraph g{
rankdir=LR //左右布局
node[shape=circle]
size = "4,4";//图片大小
0->1[label="5"];
0->2[label="2"];
0->3[label="6"];
1->4[label="1"];
2->1[label="1"];
2->4[label="5"];
2->3[label="3"];
3->4[label="2"];
}
图片生成效果: