Entering edit mode
steve
•
0
@steve-11563
Last seen 7.9 years ago
I am trying without success to set attributes for subgraphs, e.g. background colour. I know it works in GraphViz and the Rgraphviz manual says it is possible ("The subGList parameter is a list describing any subgraphs, where each element represents a subgraph and is itself a list with up to three elements. ... The last element of the list, attrs is used if there are any attributes for this subgraph. This is a named vector where the names are the attributes and the elements are the values for those attributes.") But nothing I put in that slot makes any difference:
g <- graphNEL() g <- addNode(LETTERS[1:4], g) sg1= subGraph(c("A","C"),g) subGList <- list() subGList[[1]] <- list(graph = sg1,cluster=T,attrs=c(fontsize ="33",bgcolor="green",node.color="green")) plot(g, subGList = subGList)