dot例题手打

dot参考书地址


1

dengwo@dengwo-ThinkPad-Edge-E530:~/bowl/dotll$ vim 01.dot

digraph 01{
	main ->{parse, cleanup};
	main -> printf[label="100 times",style=bold];//style=bold 指定线粗
	main -> init[style=dotted];//style=dotted 指定线型虚线
	parse -> execute;
	init -> a;
	execute -> {printf, a};
	execute -> compare[color=red];
	compare[shape=box,style=filled,color=".7 .3 1.0"];//shape=box点的形状, style=filled 填充点 color=".7 .3 1.0"颜色
	a[label="make a\nstring"]//label="make a\nstring"把a替换显示目标字符串\n表示换行
}

dengwo@dengwo-ThinkPad-Edge-E530:~/bowl/dotll$ dot -Tjpg 01.dot -o 01.jpg

dot例题手打_第1张图片



执行完dengwo@dengwo-ThinkPad-Edge-E530:~/bowl/dotll$ dot -Tjpg 01.dot -o 01.jpg

可以用vimdot命令 打开编辑 文件.dot 每次 :w 可以预览效果

dot例题手打_第2张图片 

你可能感兴趣的:(dot例题手打)