简体   繁体   English

用 igraph 在 R 中绘制大图

[英]Plotting large graph in R with igraph

I was trying to plot a network with 200 thousands nodes and 8 millions edges.我试图绘制一个具有 20 万个节点和 800 万条边的网络。 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.由于节点和边太多,通过参数“layout”更改布局可能没有太大帮助。

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.我通常将 Gephi 用于数量级高达 150 000 个节点的图形。

However it really depends on how much RAM your machine has (mine has 8 GB).然而,这真的取决于你的机器有多少内存(我的有 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.还可以通过修改配置文件来扩展 Gephi 的 RAM 分配(它不像在 RStudio 中那样自动分配。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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