2017-05-29 15 views
0

graphvizのドット言語ですべての "平行四辺形" [私のコードを参照]をSボックスの上に配置するにはどうすればよいですか?graphviz有向グラフ内の特定の形状の向きを変更します

基本的に、出力は、グラフの上部にM1 M2とMnがすべて含まれる直線のように見えます。

実際の出力: enter image description here所望の出力: enter image description here

digraph ER { 

node [group=M; shape=parallelogram]; M1; M2; M_n; 
node [group=I, shape=none]; "..."; 
node [group=V, shape=egg]; IV; V1; V2; 
node [group=C, shape=box]; "S1"; "S2"; "S_n"; f; 
node [group=F, shape=hexagon]; "FINAL"; 


    IV -> "S1"; 
    M1 -> "S1"; 
    "S1" -> V1; 
    V1 -> "S2"; 
    M2 -> "S2"; 
    "S2" -> V2; 
    V2 -> "..."; 
    "..." -> "S_n"; 
    M_n -> "S_n"; 
    "S_n" -> f; 
    f -> "FINAL" 

    rankdir=LR; 
} 

答えて

1

rank属性が同一のランクに同じsubgraphの2つ(またはそれ以上)のノードを拘束可能にします。それを念頭に置いて:

digraph ER { 

rankdir=LR; 

node [shape=none]; "..."; 
node [shape=egg]; IV; V1; V2; 
node [shape=box]; f; 
{rank=same; "S1"; M1[shape=parallelogram];} 
{rank=same; "S2"; M2[shape=parallelogram];} 
{rank=same; "S_n"; M_n[shape=parallelogram];} 
node [shape=hexagon]; "FINAL"; 

    IV -> "S1"; 
    M1 -> "S1"; 
    "S1" -> V1; 
    V1 -> "S2"; 
    M2 -> "S2"; 
    "S2" -> V2; 
    V2 -> "..."; 
    "..." -> "S_n"; 
    M_n -> "S_n"; 
    "S_n" -> f; 
    f -> "FINAL" 

} 
+0

ありがとうございました – S12000

関連する問題