二つのノードからなるグラフをいじりたおす!!!

$R
library(graph)
library(Rgraphviz)
g1 <- new("graphNEL", nodes=c("GENE1", "GENE2"), edgemode="directed")

g2 <- addEdge("GENE1", "GENE2", g1, 1)
g3 <- addEdge("GENE2", "GENE1", g1, 1)
g4 <- addEdge("GENE2", "GENE1", g2, 1)

par(mfrow=c(2,2))
plot(g1)
plot(g2)
plot(g3)
plot(g4)

node1 <- list(fillcolor = "green")
edge1 <- list(color = "red")
attrs1 <- getDefaultAttrs(list(node = node1, edge = edge1))
plot(g4, attrs = attrs1)

par(mfrow=c(2,2))
plot(g1, attrs = attrs1)
plot(g2, attrs = attrs1)
plot(g3, attrs = attrs1)
plot(g4, attrs = attrs1)

setwd("/home/tetsuo/2011/1101")
png("110124_グラフ_3")
par(mfrow=c(2,4))
plot(g1)
plot(g2)
plot(g3)
plot(g4)
plot(g1, attrs = attrs1)
plot(g2, attrs = attrs1)
plot(g3, attrs = attrs1)
plot(g4, attrs = attrs1)
dev.off()

q()


$exit