【发布时间】:2013-12-06 06:18:03
【问题描述】:
我正在尝试构建此图表 就是这样的结果:
digraph g {
//Initial settings
rankdir="LR";
margin="0,0";
node[fontsize=16,fixedsize=true,width=0.7,shape=circle];
edge[fontsize=16];
ratio=fill;
//Start point for arrow
start [shape=point,style="invis",width=0];
start -> 0;
subgraph cluster0 {
style=filled;
fillcolor=green;
node [fontsize=16,fixedsize=true,width=0.7,shape=circle, style=filled, color = black, fillcolor=lightgrey];
//FW Transitions;
13 -> 12;
13 -> 9;
13 -> 7;
9 -> 11;
//BW Transitions
edge [color=green];
12 -> 13 ;
11 -> 13;
11 -> 7;
//LVL Transitions
edge[color=red;style=solid];
7->9;
}
//FW Transitions
2 -> 4 -> 6 -> 8 -> 10 ;
0 -> 13 [style=dotted];
1 -> 3 -> 5;
0 -> 2;
0 -> 1 ;
//BW Transitions
edge [color=green,constraint=false];
5->7;
edge[constraint=true]
10 -> 12;
//LVL Transitions
edge[color=red;style=solid];
//CONSTRAINT transitions
node [shape=plaintext];
edge[style=invis];
d0 -> d1 -> d2 -> d3 -> d4 -> d5
2 -> 13 -> 1;
d2 -> 4 -> 12 -> 9 -> 7 -> 3;
//Ranking, order by distance from start
{ rank = same; 0; d0; }
{ rank = same; 1; 2; d1;13;}
{ rank = same; 4; 3; 12; 9; 7; d2;}
{ rank = same; 6; 5; d3;11;}
{ rank = same; 8; d4;}
{ rank = same; 10; d5;}
//Final states
//6[shape=doublecircle];
//7 [shape=doublecircle];
}
除了簇填充颜色之外,一切似乎都运行良好。我希望用一种颜色填充集群以指出它。我尝试了 color 和 fillcolor 属性,但没有任何反应。
这是因为我用于约束的不可见边还是与我对节点进行排名有关?
谢谢
【问题讨论】:
标签: graphviz