Graphviz-默认子图/簇样式

Graphviz-默认子图/簇样式,graphviz,Graphviz,目前我总是这样写子图/簇: subgraph "cluster_001" { rank = TB; style = "filled"; color = "#EEEEEE"; 004[label = "{<1>if\(gt \> 0\)|<2>else if\(gt == 0\)|<3>else if\(gt \< 0\)}"];

目前我总是这样写子图/簇:

subgraph "cluster_001" {
    rank = TB;
    style = "filled";
    color = "#EEEEEE";
    004[label = "{<1>if\(gt \> 0\)|<2>else if\(gt == 0\)|<3>else if\(gt \< 0\)}"];
    005[label = "..."];
    006[label = "..."];
    007[label = "..."]
}
我定义了一次,然后每个箭头都是这样设计的。这将成为默认设置


我需要一些类似的群集。。。这是怎么做到的呢?

令我惊讶的是,有一种内在的方式。将其放在群集定义之前:

graph[ rank = TB;  style = "filled";   color = "#EEEEEE";]  
像这样:

digraph d {
  a -> b
  graph[ rank = TB;  style = "filled";   color = "#EEEEEE";]
  subgraph cluster1 {
   x1 ->x2->x3
   }
     subgraph cluster2 {
   y1 ->y2->y3
   }
     subgraph cluster3 {
   z1 ->z2->z3
   }
  {rank=same e->f}
}
给予:

非常感谢!它就像一个符咒。
digraph d {
  a -> b
  graph[ rank = TB;  style = "filled";   color = "#EEEEEE";]
  subgraph cluster1 {
   x1 ->x2->x3
   }
     subgraph cluster2 {
   y1 ->y2->y3
   }
     subgraph cluster3 {
   z1 ->z2->z3
   }
  {rank=same e->f}
}