I'm trying to set a fill color in Rgraphviz for a subgraph. In the documentation, it is implied that you can set subgraph attributes where you set whether or not the subgraph is a cluster, like so:
subGList = list()
subGList[[1]] = list(graph=sg.iip, attrs=c(fillcolor="lightgreen", style = "filled",
shape = "rectangle"), cluster = TRUE)
Unfortunately, setting attributes in this manner doesn't seem to have any effect on the plot.
Because my subgraphs contain 20-30 nodes (where the full graph has 250 nodes), it's not really reasonable to code it with the nodewise method where you have to use each node name and set it to the color.
edit My current workaround is to do:
vc <- as.list(rep("lightgreen", length(subgraphNames)))
names(vc) <- subgraphNames
plot(fG.iip.NEL, 'neato', subGList=subGList, nodeAttrs = list(fillcolor=vc))