1
有没有一种方法可以绘制igraph中的网络链接或节点的R与最小值和最大值成正比?R中图表中的比例链接或节点大小?
使用绘图链路和节点属性是IGRAPH非常方便,但在一些网络中的最小值和最大值之间的差异在网络四通八达发现一个非常丑陋的图画。举例来说,看到这样的代码:
#Transforming a sample network (Safariland) from the package bipartite into an igraph object
mat = Safariland
mat2 = cbind.data.frame(reference=row.names(mat),mat)
list = melt(mat2, na.rm = T)
colnames(list) = c("plant","animal","weight")
list[,1] = as.character(paste(list[,1]))
list[,2] = as.character(paste(list[,2]))
list2 = subset(list, weight > 0)
g = graph.data.frame(list2)
g2 = as.undirected(g)
#Plotting the igraph object with edge widths proportional to link weights
plot(g2,
edge.width = E(g2)$weight)
结果是一个古怪的网,链接权重是太大的区别。如何在最小 - 最大范围内绘制这些边缘,使网络看起来更好?
非常感谢。
谢谢!它非常完美! – Marco