I'm using graphNEL
objects from gRbase
and Rgraphviz
for plotting and would like to color the nodes of the graph in different (specified) colors when plotting. For example, how could I plot this graph with a
and b
in blue and c
and d
in red?
library(Rgraphviz)
library(gRbase)
mygraph = dag(~a:c + b:c + b:d)
plot(mygraph)