1

我必须为我的 AI 课程制作一个状态空间图,我希望使用 GraphViz 来制作它(比 Dia 快得多)。我似乎不知道该怎么做的一件事是如何进行“与”连接,这基本上是连接到同一节点的两条线之间的弧线。这可能吗?

4

1 回答 1

1

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

# 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

于 2010-02-13T15:23:10.230 回答