graphviz好用的程序员画图工具 - Go语言中文社区

graphviz好用的程序员画图工具


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

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


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




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


版权声明:本文来源CSDN,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/jzaicn/article/details/48141099
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。
  • 发表于 2020-03-01 17:48:07
  • 阅读 ( 1047 )
  • 分类:职场

0 条评论

请先 登录 后评论

官方社群

GO教程

猜你喜欢