par1 <- as.numeric(par1) par2 <- as.numeric(par2) par3 <- as.numeric(par3) library(igraph) ps.options(family='serif') df <- read.table(file='https://automated.biganalytics.eu/download/dataframe.txt',sep=',',header=F) v <- read.table(file='https://automated.biganalytics.eu/download/vertices.txt',sep=',',header=F) g <- graph.data.frame(df, directed=T, vertices=v) myvcount = vcount(g) myarea = myvcount^par1 myradius = myvcount * myarea V(g)$size=1 l <- layout.fruchterman.reingold(g,dim=par2,params=list(niter=5000, area=myarea, repulserad=myradius)) bitmap(file='pic.png') plot(g, axes=F, xlab='', ylab='', layout=l, vertex.size=V(g)$size, vertex.label.cex=par3, vertex.label.dist=0.5, edge.arrow.size=0.2, vertex.label=V(g)$age, main = main) dev.off()
|