Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/277.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 如何在正交图形中组合边?_Graphviz - Fatal编程技术网

Graphviz 如何在正交图形中组合边?

Graphviz 如何在正交图形中组合边?,graphviz,Graphviz,我使用的是spline=ortho,我希望边可以折叠在一起。为了举例说明,我想实现以下目标: 我试过这个: digraph G { splines=ortho; edge [dir=none]; node [shape=diamond, label="", height=0.1, width=0.1]; start -> a [weight=10]; start -> b; start -> c; start -> d; start

我使用的是
spline=ortho
,我希望边可以折叠在一起。为了举例说明,我想实现以下目标:

我试过这个:

digraph G {
  splines=ortho;

  edge [dir=none];
  node [shape=diamond, label="", height=0.1, width=0.1];

  start -> a [weight=10];
  start -> b;
  start -> c;
  start -> d;
  start -> e;
}
但结果是这样的:


关于如何使边彼此重叠的任何线索?

您需要在与
start
相同的级别上创建空节点,并首先连接到它们,然后绘制图形的其余部分:

digraph G
{  
  node[ shape = point, label="", height=0, width=0 ] 01 02 03 04; 
  node[ shape=diamond, label="", height=0.1, width=0.1 ];
  { rank = same; start 01 02 03 04; }

  edge [dir=none];
  start -> 01 -> 02 -> 03 -> 04[ minlen = 2 ];
  start -> a [weight=2];
  01 -> b;
  02 -> c;
  03 -> d;
  04 -> e;
}
屈服


您需要在与
start
相同的级别上创建空节点,并首先连接到它们,然后绘制图形的其余部分:

digraph G
{  
  node[ shape = point, label="", height=0, width=0 ] 01 02 03 04; 
  node[ shape=diamond, label="", height=0.1, width=0.1 ];
  { rank = same; start 01 02 03 04; }

  edge [dir=none];
  start -> 01 -> 02 -> 03 -> 04[ minlen = 2 ];
  start -> a [weight=2];
  01 -> b;
  02 -> c;
  03 -> d;
  04 -> e;
}
屈服

有关ro如何使用空节点的信息,请参见查看ro如何使用空节点