[R] Howto modify a drawn graph with igraph

From: Etienne Cuvelier <etienne.cuvelier_at_ecp.fr>
Date: Sun, 06 Jun 2010 17:58:14 +0200

Example:
library(igraph)

```M <- matrix( nc=12, nr=12 , 0)
M[ 1,]=c(0,1,0,0,1,1,0,0,0,0,0,0)
M[ 2,]=c(1,0,1,1,1,0,0,0,0,0,0,0)
M[ 3,]=c(0,1,0,0,0,1,1,0,0,0,0,0)
M[ 4,]=c(0,1,0,0,0,1,0,0,0,0,0,0)
M[ 5,]=c(1,1,0,0,0,0,0,0,0,0,0,0)
M[ 6,]=c(1,0,1,1,0,0,0,0,0,0,0,0)
M[ 7,]=c(0,0,1,0,0,0,0,1,1,0,0,1)
M[ 8,]=c(0,0,0,0,0,0,1,0,1,0,0,1)
M[ 9,]=c(0,0,0,0,0,0,1,1,0,0,1,1)
M[10,]=c(0,0,0,0,0,0,0,0,0,0,1,0)
M[11,]=c(0,0,0,0,0,0,1,0,1,0,0,0)
M[12,]=c(0,0,0,0,0,0,0,1,1,0,0,0)
```

plot(g,layout=mlayout)

#And now howto add a weight associated on edges on the "picture"?
#Or howto change the color of an edge, or a vertice?

Thanks for help.

Etienne

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Sun 06 Jun 2010 - 17:29:56 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 07 Jun 2010 - 17:00:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.