graphviz中边和节点的布局

发布于 2024-09-08 12:33:43 字数 736 浏览 2 评论 0原文

在 graphviz 中,我希望有一条不穿过节点的边。 这是我的图表:

digraph G {
 rankdir=LR;
 fontname = "Bitstream Vera Sans";
 fontsize = 8;

  node [
   fontname = "Bitstream Vera Sans"
   fontsize = 8
   shape = "record"
  ];

  edge [
    fontname = "Bitstream Vera Sans"
   fontsize = 8
 ];

  MethodContext [
    label = "{ <head> MethodContext | <parent> parent \l| nativeIP \l | ip \l| sp \l| receiver \l| method  \l|  flags \l| Temp Var 1 \l Temp Var 2 \l ... \l Temp Var n \l| Stack \l ... \l Stack \l }"
  ];

  MethodContext:parent -> MethodContext:head [tailport=e];
}

没有尾部,我得到了一个很好的垂直图表,除了边缘穿过节点。但是,一旦我像示例中那样添加 [tailport=e] ,我的图形就是水平的,并且边缘仍然穿过节点。

如何保持节点垂直并将边缘连接到右侧?

谢谢

In graphviz I would like to have an edge that doesn't cross the node.
Here is my graph:

digraph G {
 rankdir=LR;
 fontname = "Bitstream Vera Sans";
 fontsize = 8;

  node [
   fontname = "Bitstream Vera Sans"
   fontsize = 8
   shape = "record"
  ];

  edge [
    fontname = "Bitstream Vera Sans"
   fontsize = 8
 ];

  MethodContext [
    label = "{ <head> MethodContext | <parent> parent \l| nativeIP \l | ip \l| sp \l| receiver \l| method  \l|  flags \l| Temp Var 1 \l Temp Var 2 \l ... \l Temp Var n \l| Stack \l ... \l Stack \l }"
  ];

  MethodContext:parent -> MethodContext:head [tailport=e];
}

Without the tailport I got a nice vertical graph except that the edge is crossing the node. But as soon as I add [tailport=e] like in the example my graph is horizontal and the edge is still crossing the node.

How could I keep the node vertical and have the edge attached to the right side?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

话少心凉 2024-09-15 12:33:43

谁想知道解决方案是

MethodContext:parent -> MethodContext:head:e;

Who ever want to know the solution is

MethodContext:parent -> MethodContext:head:e;
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文