Created
January 26, 2016 16:04
-
-
Save cndesantana/43468b24b365c44443af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(igraph) | |
nnodes = 100;#number of nodes is 100 | |
g<-erdos.renyi.game(nnodes,0.07);#random graph with nnodes nodes | |
ypos<-round(runif(nnodes,min=0,max=3))#positions between 0 and 10 | |
mysizes<-runif(nnodes,min=8,max=16)#sizes between 3 and 10 | |
xpos<-runif(nnodes) | |
mylayout<-as.matrix(cbind(xpos,ypos)) | |
png("./test.png",width=1980,height=1240,res=100) | |
plot(g, layout=mylayout, vertex.size=sizes, axes = FALSE, rescale=FALSE, ylim=range(ypos), vertex.size=mysizes) | |
dev.off(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Below is the resulting figure