如何在GraphViz中双向制作边缘? [英] How to make an edge with both direction in GraphViz?
本文介绍了如何在GraphViz中双向制作边缘?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在GraphViz中制作两个方向的边?
How to make an edge with both direction in GraphViz?
我正在尝试制作两个方向的弯曲边缘.
I am trying to make an curved edge with both direction.
但是我唯一能做的是:
我想使x1和x2之间的边沿两个方向弯曲.
I want to make the edge between x1 and x2 curved with both direction.
我使用的代码:
digraph {
rankdir=LR
node [shape=box ]
x1;x2
node [shape=oval ]
y
x1->y[dir=back label=0.77]
x2->y[dir=back label=0.42]
x1:w -> x2:w[dir=both constraint=false]
}
我将不胜感激.
推荐答案
我认为应该有一个更好的解决方案,但以下对我有用:
I think there should be a better solution but the following did work for me:
digraph {
rankdir=LR
node [shape=box ]
x1;x2
node [shape=oval ]
y
x1->y[dir=back label=0.77]
x2->y[dir=back label=0.42]
x1:w -> x2:w[dir=both constraint=false]
x2:w -> x1:w[dir=both constraint=false]
}
基于更改点中边缘方向的答案:
digraph g {
rankdir=LR
node [shape=box ]
{rank=same x1;x2}
node [shape=oval ]
y
x1 -> y[dir=back label=0.77]
x2 -> y[dir=back label=0.42]
x1:w -> x2:w[dir=both label=0.34]
}
这篇关于如何在GraphViz中双向制作边缘?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文