Simone,
read.graph adds the "id" vertex attribute, so use that with plot:
g <- read.graph("primoMese2004.net", format="pajek")
plot(g, layout=layout.kamada.kawai, labels=V(g)$id)
or
tkplot(g, layout=layout.kamada.kawai, labels=V(g)$id)
Gabor
On Thu, Apr 12, 2007 at 06:06:20PM +0200, Simone Gabbriellini wrote:
Dear List,
I am experiencing a problem importing a .net file into igraph.
The sintax I am using is:
g<-read.graph("primoMese2004.net", format="pajek")
when the file is imported and I plot it, I can see that the node
labels are switched, and the more central nodes (based on degree
centrality) labelled "16", "1", "50" that I had before become "2",
"30" and "45"...
maybe I do something wrong in the sintax?
the .net file is:
*Vertices 64
1 "47"
[...]
--
Csardi Gabor <address@hidden> MTA RMKI, ELTE TTK
_______________________________________________
igraph-help mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/igraph-help