2017-10-17 157 views
1

我捆扎使用的Graphviz enter image description here控制的Graphviz箭头方向

digraph UDEF0 { 
"Plan New Information Program" [shape=box] 
"Issues"      [shape=none] 
"Operation Data"    [shape=none] 
"Program Charter"    [shape=none] 
"Program Team"     [shape=none] 
"Program Plan"     [shape=none] 

"Issues" ->   "Plan New Information Program" 
"Operation Data" -> "Plan New Information Program" 

"Program Charter" -> "Plan New Information Program" 

"Program Team" ->  "Plan New Information Program" 

"Plan New Information Program" -> "Program Plan" 
} 

的问题是,我无法找到以控制围绕中央框的箭头方向上的方式来绘制IDEF0图示例。

我试过使用隐藏的“框架”由不可见的南,北,东和西节点连接到他们的箭头。不幸的是,“框架”运作良好,只有当它是空的,而当我连接我的“有效载荷”节点它的结构破坏:

digraph UDEF0 { 
    rankdir=LR 
    "Plan New Information Program" [shape=box] 
    "Issues"      [shape=none] 
    "Operation Data"    [shape=none] 
    "Program Charter"    [shape=none] 
    "Program Team"     [shape=none] 
    "Program Plan"     [shape=none] 
    "Program Plan"     [shape=none] 


    "West"     [shape=none] 
    "North"     [shape=none] 
    "South"     [shape=none] 
    "East"     [shape=none] 
    "West" -> "North" -> "East" 
    "West" -> "South" -> "East" 


    "West" -> "Issues" ->   "Plan New Information Program" 
    "West" -> "Operation Data" -> "Plan New Information Program" 

    "North" -> "Program Charter" -> "Plan New Information Program" 

    "South" -> "Program Team" ->  "Plan New Information Program" 

    "East" -> "Plan New Information Program" -> "Program Plan" 
} 

是在实施这个图式的任何正确的方式?

回答

2

使用shape = record带给你接近你想要的东西 - 在这里我重新编写尝试:

digraph UDEF0 
{ 
    A[ label = "Plan New\nInformation\nProgram", shape=box, style = filled, fillcolor = grey ] 
    B[ shape = record, color = white, label = "{ Operation Data | Issues }" ] 
    node[ shape = none ] 
    c[ label = "Program Charter" ] 
    d[ label = "Program Team" ] 
    e[ label = "Program Plan" ] 

    { rank = same; A B e } 

    c -> A; 
    A -> d[ dir = back ]; 
    edge[ minlen = 3] 
    B -> A; 
    B -> A; 
    A -> e; 
} 

产量

enter image description here