简体   繁体   中英

Plotting large graph in R with igraph

I was trying to plot a network with 200 thousands nodes and 8 millions edges. The code I used was here:

library(igraph)
file.choose()
xlist<-read.graph("/Users/quyao/Desktop/redstar_relation.txt", format="ncol", directed=TRUE)
xlist
png('my_png.png', width = 1600, height =900)
plot(xlist)
dev.off()

I got this:

It's hard to study the topology with this kind of picture. Do you have any suggestions?

As there are too many nodes and edges, change the layout through the parameter 'layout' may not be so helpful.

Constructing this picture took about one and half hours using my code, how could i make it faster?

Many thanks.

Consider using another software for visualization. I generally use Gephi for graphs with a magnitude up to 150 000 nodes.

However it really depends on how much RAM your machine has (mine has 8 GB). There is also the possibility to expand RAM allocation to Gephi by modifying their configuration file (it is not allocated automatically like in RStudio.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM