相关疑难解决方法(0)

允许在graphviz中重叠边缘

背景

使用graphviz创建组织结构图.

问题

默认情况下,dot创建以下图表:

所需的输出结合边缘,使它们重叠,与弯头连接:

源代码

以下源代码生成有问题的图表:

digraph G {
  splines = ortho;
  concentrate = true;

  node [shape="box", style="rounded", penwidth = 2];
  edge [color="#142b30", arrowhead="vee", penwidth = 2];

  {
    rank = same
    "1";
    "2";
    "3";
    "4";
  }

  "Main Node" -> "1";
  "Main Node" -> "2";
  "Main Node" -> "3";
  "Main Node" -> "4";

  {
    rank = same
    "5";
    "6";
    "7";
  }

  "1" -> "5";
  "1" -> "6";
  "1" -> "7";
}
Run Code Online (Sandbox Code Playgroud)

如何dot在曼哈顿布局中创建正交的肘关节边缘?

思路

我曾尝试各种组合sametail …

dot edge graphviz orthogonal

10
推荐指数
1
解决办法
4574
查看次数

在Graphviz中,如何将边缘与节点的顶部中心对齐?

在Graphviz/dot中,是否可以将边缘准确地连接到节点的顶部中心?阅读点指南,我想,tailportheadport会帮助我,但添加这些没有区别,有时让我更奇怪的结果.

这就是我得到的:

样本图

这就是我要找的东西:

想要的结果

我用来获取(不正确)图表的代码是:

digraph G {

  graph [splines = ortho];
  node [shape = box];
  edge [dir = none];

  {
    rank = same

    A
    AB [shape = point]
    B

    A -> AB
    AB -> B
  }

  {
    rank = same
    point1 [shape = point]
    point2 [shape = point]
    point3 [shape = point]
  }

  AB -> point1

  // The following section if to make the nodes appear in 
  // the correct order, not sure if there's a …
Run Code Online (Sandbox Code Playgroud)

dot graphviz

5
推荐指数
2
解决办法
4776
查看次数

标签 统计

dot ×2

graphviz ×2

edge ×1

orthogonal ×1