I'm using graphviz/dot to generate a graph.
I want to group nodes and/or edges in the graph into semantic classes, with each class having a set of node and/or edge properties that cascade or inherit similar to CSS. However, if I group a single node into multiple classes, the later attribute declaration will override the earlier attribute declaration, even if that attribute was not specified in the later declaration. In particular, it reverts the value to the default/higher-scoped value.
For example:
node [shape="hexagon", style="filled", fillcolor="lightskyblue1"];
{ node [shape="box"]; a; b; }
{ node [fillcolor="red"]; b; c; }
What I want:
a [shape="box", style="filled", fillcolor="lightskyblue1"];
b [shape="box", style="filled", fillcolor="red"];
c [shape="hexagon", style="filled", fillcolor="red"];
What I get:
a [shape="box", style="filled", fillcolor="lightskyblue1"];
b [shape="hexagon", style="filled", fillcolor="red"];
c [shape="hexagon", style="filled", fillcolor="red"];
Is this possible?