data(lopho)
require(ggplot2)
require(igraph)
layout <- layout.fruchterman.reingold( lopho )
V(lopho)$x <- layout[,1]
V(lopho)$y <- layout[,2]
p <- ggplot() + geom_edgeset( aes(x,y), lopho)
p <- p + geom_nodeset( aes(x,y), lopho )
p
p + theme_empty()
p <- ggplot() + geom_edgeset( aes(x,y,color=weight), lopho)
p
Run the code above in your browser using DataLab