The Discrete Case: Multinomial Bayesian Networks 31
Similarly, we can highlight nodes with nodeRenderInfo. We set their
colour and the colour of the node labels to black and their background to
grey.
> nodeRenderInfo(pp) <-
+ list(col = c("S" = "black", "E" = "black", "R" = "black"),
+ textCol = c("S" = "black", "E" = "black", "R" = "black"),
+ fill = c("E" = "grey"))
Once we have made all the desired modifications, we can plot the DAG again
with the renderGraph function from Rgraphviz.
> renderGraph(pp)
More complicated plots can be created by repeated calls to edgeRenderInfo
and nodeRenderInfo. These functions can be used to set several graphical
parameters for each arc or node, and provide a fine-grained control on the
appearance of the plot. Several