Question: Subgraph attributes in Rgraphviz
0
2.6 years ago by
steve0
steve0 wrote:

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()

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)

rgraphviz • 375 views