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?
The data can be read as "V1 is a follower of V2", on down.
g <- graph.data.frame(graph_subset, directed=TRUE)
plot(g, edge.width=E(g)$weight)
I agree with @MrFlick's comment and @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 is my best option.
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
. There are more commands, find them in the tutorial that @zx8754 mentioned, section 4.2.
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.