连接圆点之间的圆弧(GraphViz) [英] Connecting arcs between lines in Dot (GraphViz)

查看:136
本文介绍了连接圆点之间的圆弧(GraphViz)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须为我的AI课程做一个状态空间图,并且我希望使用GraphViz来制作它(比Dia快得多)。我似乎无法弄清楚如何做的一件事是如何做一个And连接,它基本上是连接到同一节点的两条线之间的一条弧线。这可能吗?

I've got to do up a state space graph for my AI course, and I was hoping to use GraphViz to make it (so much faster than Dia). The one thing I can't seem to figure out how to do is how to do an "And" connection, which is basically an arc between two lines connecting to the same node. Is this possible?

推荐答案

是的。虽然没有明确的点语法,但它几乎总是这样:

Yes. While there's no explicit dot syntax for this, here's the way it's nearly always done:

# just graph set-up
digraph new_graph {
ratio = "auto"
mincross = 2.0

# draw some nodes
"001" [shape=box, regular=1, style=filled, fillcolor="#FCD975"] ;
"017" [shape=circle  , regular=1,style=filled,fillcolor="#9ACEEB"   ] ;
"007" [shape=diamond  , regular=1,style=filled,fillcolor="#FCD975"   ] ;
# the key line--creating tiny node w/ no label, no color
# i use this style because it mimics the 'midpoint' style used in Omnigraffle et al.
"LN01" [shape=diamond,style=filled,label="",height=.1,width=.1] ;

# draw the edges
"001" -> "LN01" [dir=none,weight=1] ;
"007" -> "LN01" [dir=none,weight=1] ;
"LN01" -> "017" [dir=none, weight=2] ;
}

替代文字http://img121.imageshack.us/img121/2547/dotgvziv.png

这篇关于连接圆点之间的圆弧(GraphViz)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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