graphviz好用的程序员画图工具

来源:互联网 发布:中国警察智识数据库 编辑:程序博客网 时间:2024/05/16 19:14

本文仅用于记述我自己的一点使用,如果有需要请百度其他文章入门

digraph G{node[shape=record,width=.1,height=.1,fontname="yahei",fontsize=14]a[label="你好"]}




设置字体,可以兼容中文,微软的雅黑比较漂亮,

----------------------------------------

digraph G{node[shape=record,width=.1,height=.1,fontname="yahei"]rankdir = LR; node1[label = "<title>1 if first tag byte has next byte|  { {8| }|{7| }|{6| }|{5|1}|{4|1}|{3|1}|{2|1}|{1|1}}"];node2[label = "<title>2 if next tag byte has next byte|  { {8|1}|{7| }|{6| }|{5| }|{4| }|{3| }|{2| }|{1| }}"];node3[label = "<title>3 if this tlv is a constract shows|  { {8| }|{7| }|{6|1}|{5| }|{4| }|{3| }|{2| }|{1| }}"];}




设置数据结构


------------------------------------------------------------------------

digraph G{node[shape=record,width=.1,height=.1,fontname="yahei"]//rankdir = LR; node1[label = "<title>1 if first tag byte has next byte|  { {8| }|{7| }|{6| }|{5|1}|{4|1}|{3|1}|{2|1}|{1|1}}"];node2[label = "<title>2 if next tag byte has next byte|  { {8|1}|{7| }|{6| }|{5| }|{4| }|{3| }|{2| }|{1| }}"];node3[label = "<title>3 if this tlv is a constract shows|  { {8| }|{7| }|{6|1}|{5| }|{4| }|{3| }|{2| }|{1| }}"];}


排布方向LR,left to right


-----------------------------------------------------




可以通过代码构造整个流程,不过这种方式构造不太好


0 0
原创粉丝点击