【发布时间】:2014-10-09 19:13:53
【问题描述】:
我正在使用 graphviz/dot 生成图表。
我想将图中的节点和/或边分组为语义类,每个类都有一组节点和/或边属性,这些属性与 CSS 类似。但是,如果我将单个节点分组为多个类,则后面的属性声明将覆盖前面的属性声明,即使后面的声明中没有指定该属性。特别是,它将值恢复为默认/更高范围的值。
例如:
node [shape="hexagon", style="filled", fillcolor="lightskyblue1"];
{ node [shape="box"]; a; b; }
{ node [fillcolor="red"]; b; c; }
我想要什么:
a [shape="box", style="filled", fillcolor="lightskyblue1"];
b [shape="box", style="filled", fillcolor="red"];
c [shape="hexagon", style="filled", fillcolor="red"];
我得到了什么:
a [shape="box", style="filled", fillcolor="lightskyblue1"];
b [shape="hexagon", style="filled", fillcolor="red"];
c [shape="hexagon", style="filled", fillcolor="red"];
这可能吗?
【问题讨论】: