用graphviz强制边缘上的方角

Dan*_*age 12 dot graphviz

我有以下.dot文件.

digraph
{
    node [color=Limegreen,fontcolor=Limegreen,shape=oval]
    ilocus [label="iLocus"]
    gilocus [label="giLocus"]
    pilocus [label="piLocus"]
    nilocus [label="niLocus"]
    silocus [label="siLocus"]
    cilocus [label="ciLocus"]
    filocus [label="fiLocus"]
    iilocus [label="iiLocus"]

    node [color=Blue,fontcolor=Blue,shape=diamond]
    containgene [label="Contains gene(s)?"]
    proteincoding [label="Protein coding?"]
    multiplegenes [label="Multiple genes?"]
    geneflank [label="Flanked by genes\non both sides?"]

    ilocus -> containgene
    containgene:e -> geneflank [xlabel="No"]
    geneflank:e -> filocus [xlabel="No"]
    geneflank:w -> iilocus [xlabel="Yes"]
    containgene:w -> gilocus [xlabel="Yes"]
    gilocus -> proteincoding
    proteincoding:e -> nilocus [xlabel="No"]
    proteincoding:w -> pilocus [xlabel="Yes"]
    pilocus -> multiplegenes
    multiplegenes:e -> silocus [xlabel="No"]
    multiplegenes:w -> cilocus [xlabel="Yes"]
}
Run Code Online (Sandbox Code Playgroud)

用graphviz渲染我得到以下内容.

Graphviz取1

有什么方法可以强迫边缘有方角而不是圆角?splines=ortho文档中的属性似乎是为此原则设计的,但在实践中,当我添加graph [splines=ortho]到我的有向图时,我只是直线.

Graphviz取2

无论如何我可以用graphviz在边缘上找到方角?类似于以下内容:

  ------ Multiple genes? -----
  |                          |
  | N                      Y |
  |                          |
  v                          V
siLocus                   ciLocus
Run Code Online (Sandbox Code Playgroud)

mar*_*pet 0

您可以简单地使用splines=false链接到 GraphvizFiddle)。