简体   繁体   English

如何使igraph网络在R中更具可读性?

[英]How to make igraph network more readable in R?

I have the following sample data (total of 700 observations), code and resulting graph in R. How can I modify the code to make the graph more readable? 我在R中有以下示例数据(总共700个观测值),代码和结果图。如何修改代码以使图更易读?

The data can be read as "V1 is a follower of V2", on down. 可以将数据读取为“ V1是V2的跟随者”。

在此处输入图片说明

g <- graph.data.frame(graph_subset, directed=TRUE)
plot(g, edge.width=E(g)$weight)

在此处输入图片说明

I agree with @MrFlick's comment and @zx8754. 我同意@MrFlick的评论和@ zx8754。 You could also try modifying the layout: 您也可以尝试修改布局:

plot(g, mode = "circle", edge.width=E(g)$weight)

There are several modes to modify the layout: circle, eigen, random, spring, kamadakawi and so on. 有几种修改布局的模式:圆形,本征,随机,弹簧,kamadakawi等。 Kamadakawi is my best option. Kamadakawi是我最好的选择。

Hope it helps! 希望能帮助到你!


Try: 尝试:

plot(g, layout=layout_in_circle, edge.width=E(g)$weight)

this must change the layout, you can also modify the size of vertex with vertex.cex=1.5 and hide the labels with displaylabels=F . 这必须更改布局,也可以使用vertex.cex=1.5修改顶点的大小,并使用displaylabels=F隐藏标签。 There are more commands, find them in the tutorial that @zx8754 mentioned, section 4.2. 还有更多命令,请在@ zx8754提到的教程的第4.2节中找到它们。

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

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