new("renderInfo")
or by using the initializer .renderInfoPrototype
.pars
:nodes
and edges
. When not set further down the
parameter hierarchy, these defaults will be used for all
nodes/edges in the graph. nodes
:edges
:graph
:nodes
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
and graph
can take arbitrary skalars, the latter
for both edges and nodes.renderGraph
. pars
nodes
edges
graph
g
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 codeb~aparRenderInfo<-
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
black
.solid
. Valid values are the same as for the R's base
graphic parameter lty
.1
. Note that the underlying low level plotting functions do
not support vectorized lwd
values. Instead, only the first
item of the vector will be used. transparent
.black
.14
. Note that the fontsize will be
automatically adjusted to make sure that all labels fit their
respective nodes. You may want to increase the node size by
supplying the appropriate layout parameters to Graphviz
in order to allow for larger fontsizes.black
.solid
. Valid values are the same as for the R's base
graphic parameter lty
.1
.black
.14
.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)
Run the code above in your browser using DataLab