<br />
library("Rgraphviz")<br />
set.seed(123)<br />
V <- letters[1:10]<br />
M <- 1:4<br />
g1 <- randomGraph(V, M, 0.2)<br />
<br />
nodes(g1)[1]<-"a special case of \n change new line"<br />
<br />
x<-layoutGraph(g1, layoutType="dot")<br />
nodeRenderInfo(x)<-list(fontsize=15)<br />
png("hou.png", width=1000, height=1000)<br />
renderGraph(x)<br />
dev.off()<br />
<br />