自循环边在graphviz中太短且丑陋 [英] self loop edges too short and ugly in graphviz

查看:103
本文介绍了自循环边在graphviz中太短且丑陋的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用graphviz画了一幅画.请参阅 FSM . 我认为这很丑陋,因为自环边缘太短了. 边缘的"minlen"属性对我不起作用. 我尝试了该节点的多个端口,但是除了我当前的实现之外,所有这些都显示出一团糟.你对我有个聪明的主意吗? 代码在这里:

I drawed a picture using graphviz. Please see FSM. I think It is ugly because self loop edges are so short. The attribute "minlen" of edges doesn't work for me. And I tried several ports of the node, but it all shows a mess except my current implementation. Do you have a clever idea for me ? Code is here:

digraph finite_state_machine {
rankdir=LR;
size="8,2"
fontname="Verdana"
node [shape = doublecircle]; Idle;
node [shape = circle,nodesep = "2.0"];
Working:s -> Working:s [ label = "response[j]?" ,minlen = 50000];
Idle -> Working [ label = "boot" ];
Working:n -> Working:n [ label = "sendtx[i]!",minlen = 50000 ];
Working:e -> Working:e [ label = "qry!" ,minlen = 50000];

}

推荐答案

添加nodesep=1;会使循环变大,尽管效果不佳.因此,这将有所帮助:

Adding nodesep=1; makes loops larger, although not nicer. So this would help:

digraph finite_state_machine {
  rankdir=LR;
  size="8,2"
  fontname="Verdana"
  node [shape = doublecircle]; Idle;
  node [shape = circle,nodesep = "2.0"];
  Working:s -> Working:s [ label = "response[j]?" ,minlen = 50000];
  Idle -> Working [ label = "boot" ];
  Working:n -> Working:n [ label = "sendtx[i]!" ];
  Working:e -> Working:e [ label = "qry!"];
  nodesep=1;
}

会产生类似的内容:

点输出

这篇关于自循环边在graphviz中太短且丑陋的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆