Question: Subgraph attributes in Rgraphviz
gravatar for steve
3.0 years ago by
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()
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)



rgraphviz • 461 views
ADD COMMENTlink written 3.0 years ago by steve0
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 162 users visited in the last hour