| renderInfo-class {graph} | R Documentation |
A container class to manage graph rendering attributes.
Objects can be created by calls of the form new("renderInfo")
or by using the initializer .renderInfoPrototype.
nodes:edges:pars:nodes and edgesnodes and edges can take arbitrary
vectors, the only restriction is that they have to be of either
length 1 or length equal to the number of nodes or edges,
respectively.
pars can take arbitrary skalars for both edges and nodes.
The following are functions rather than methods and build the API to
control the graphical output of a graph when it is plotted using
renderGraph. Please see
graphRendering for more details.
nodesedgesgraphparsg is a graph object and
name is a character giving the name of one of the item in the
respective slot. When name is missing this will give you the
whole list.
The setters are a bit more complex: nodeRenderInfo<- and
edgeRenderInfo<- can take
a~b is equivalent to code{b~a}parRenderInfo<-{will only take a list with items
nodes, edges and graph. The content of these
list items can be arbitrary named vectors.}
parRenderInfo<-{takes an arbitrary list}
Deepayan Sarkar, Florian Hahne
g <- randomGraph(letters[1:4], 1:3, p=0.8)
nodeRenderInfo(g) <- list(fill=c("a"="red", "b"="green"))
edgeRenderInfo(g) <- list(lwd=3)
edgeRenderInfo(g) <- list(lty=3, col="red")
parRenderInfo(g) <- list(edges=list(lwd=2, lty="dashed"),
nodes=list(col="gray", fill="gray"))
nodeRenderInfo(g)
edgeRenderInfo(g, "lwd")
edgeRenderInfo(g, c("lwd", "col"))
parRenderInfo(g)