11

I am using igraph for plotting a graph in R doing something like plot(mygraph, vertex.color = "green").

Is there a way to change the color and/or width of the vertices' borders?

3lectrologos
  • 9,469
  • 4
  • 39
  • 46

4 Answers4

16

Check out the code below;

plot(all, layout=All_layout, vertex.size=2, vertex.label=V(All)$name,
vertex.color="green", vertex.frame.color="red", edge.color="grey",  
edge.arrow.size=0.01, rescale=TRUE,vertex.label=NA, vertex.label.dist=0.0,
vertex.label.cex=0.5, add=FALSE,   vertex.label.font=.001)
Sean Mc
  • 458
  • 6
  • 14
7

This post is outdated. Look here for a solution that works for the current version of igraph (0.6.5).

Community
  • 1
  • 1
panuffel
  • 624
  • 1
  • 8
  • 15
7

As Sean Mc wrote above, vertex border color can be changed by using the vertex.frame.color parameter. It turns out that igraph provides no vertex.frame.width parameter, but the solution proposed here works great for changing the border width.

3lectrologos
  • 9,469
  • 4
  • 39
  • 46
1

igraph does now have vertex.frame.width (version 1.3.5)

Chris
  • 1,479
  • 2
  • 15
  • 19