I'm trying to print out a directed graph, and I keep changing various node attributes such as color and shape. Is there some way to use a variable which is defined once and used for multiple nodes? Ideally I'd like something like this:
digraph g {
building_color = "red"
land_color = "green"
farm [ fillcolor=land_color]
barn [ fillcolor=building_color]
house [ fillcolor=building_color]
}
So I can change building color once without having to go to each node. Is this possible?