代码之家  ›  专栏  ›  技术社区  ›  mathk

图形化中边缘和节点的布局

  •  1
  • mathk  · 技术社区  · 14 年前

    在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] 就像在示例中一样,我的图形是水平的,边缘仍然穿过节点。

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

    谢谢

    1 回复  |  直到 13 年前
        1
  •  1
  •   mathk    14 年前

    谁想知道解决办法是

    MethodContext:parent -> MethodContext:head:e;