How to set edge colors and vertex spacing with R / igraph

冷暖自知 提交于 2019-12-05 12:40:26
Chris Watson
  1. You can change the values for the ylim and xlim arguments to plot.igraph (and perhaps also the asp argument). If none of those works, then you may have to give the vertices x and y attributes to space them out.
  2. To color edges based on weight, you would do e.g.

    E(g)$color[E(g)$weight == 8] <- 'green'
    E(g)$lty[E(g)$weight == 8] <- 1
    E(g)$color[E(g)$weight == 3] <- 'green'
    E(g)$lty[E(g)$weight == 3] <- 2
    

And so on. The rest of your question is more up to your personal preference.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!