Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/lua/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用样条曲线设置边的弯曲方向=";“弯曲的”;在GraphViz?(使用neato)_Graphviz_Dot_Neato - Fatal编程技术网

如何使用样条曲线设置边的弯曲方向=";“弯曲的”;在GraphViz?(使用neato)

如何使用样条曲线设置边的弯曲方向=";“弯曲的”;在GraphViz?(使用neato),graphviz,dot,neato,Graphviz,Dot,Neato,我正在创建一个带有手动定位节点的图形,并在它们之间使用spline=“curve”类型的边 digraph graphname { splines="curved"; node[shape = box, margin="0.03,0.03", fontsize=11, height=0.1, width=0.1, fixedsize=false]; "LeftFoot\nRightHand" [pos="-150,-150!"]; "RightFoot\nRightHand"

我正在创建一个带有手动定位节点的图形,并在它们之间使用spline=“curve”类型的边

digraph graphname {
  splines="curved";
  node[shape = box, margin="0.03,0.03", fontsize=11, height=0.1, width=0.1,  fixedsize=false];

  "LeftFoot\nRightHand" [pos="-150,-150!"];
  "RightFoot\nRightHand" [pos="-90,-150!"];
  "LeftFoot\nRightFoot" [pos="0,-150!"];
  ...

  edge[style = solid,fontsize=11];
  "LeftFoot\nRightFoot":n -> "RightFoot\nRightHand":n [label = "3", penwidth = 1, color = "red"];
  "LeftFoot\nRightFoot":s -> "LeftFoot\nRightHand":s [label = "7", penwidth = 1, color = "red"];
  ...
}
问题是其中一条边弯曲到错误的一侧,因此它会通过一个节点:

有没有一种简单的方法来解决这个问题,例如TikZ中的“向左弯曲”或“向右弯曲”


我尝试使用边上的pos属性设置样条曲线控制点以更改折弯,但这似乎根本不会更改边。

在Graphhiz
2.38中,这似乎是固定的。我已经稍微缩放了
pos
,但剩下的代码都没有:

点源:

digraph graphname {
  splines="curved";
  node[shape = box, margin="0.03,0.03", fontsize=11, height=0.1, width=0.1,  fixedsize=false];

  "LeftFoot\nRightHand" [pos="-2,-2!"];
  "RightFoot\nRightHand" [pos="-1.2,-2!"];
  "LeftFoot\nRightFoot" [pos="0,-2!"];

  edge[style = solid,fontsize=11];
  "LeftFoot\nRightFoot":n -> "RightFoot\nRightHand":n [label = "3", penwidth = 1, color = "red"];
  "LeftFoot\nRightFoot":s -> "LeftFoot\nRightHand":s [label = "7", penwidth = 1, color = "red"];

}
命令:

dot-Kneato-Tpng input.gv>output.png
输出: