[R] igraph
Paul Murrell
p.murrell at auckland.ac.nz
Tue Feb 16 22:34:34 CET 2010
Hi
gabrielap wrote:
> Hello...
>
> I am a system engeenering student and I am using R for first time for
> Graph Theory. I would like to know if there is anyway you can plot an ghaph
> (igraph library) and obtain a graph whose vertices dont appear identified
> with number, instead I would like the vertices to be identified with letters
> or words, names... is there anyway I can do this?
You can set the "label" attribute for the graph vertices, for example, ...
g <- graph.ring(10)
plot(g)
g <- set.vertex.attribute(g, "label", value=letters[1:10])
plot(g)
Paul
> Thanks in Advance for your Help.
>
> Sincerly.
>
> Gabriela Prasad
>
> P.D. Sorry for my not at all perfect english. I am from a Spanish Country.
--
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
paul at stat.auckland.ac.nz
http://www.stat.auckland.ac.nz/~paul/
More information about the R-help
mailing list