[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] problem reading .net file
From: |
Gabor Csardi |
Subject: |
Re: [igraph] problem reading .net file |
Date: |
Thu, 12 Apr 2007 18:19:18 +0200 |
User-agent: |
Mutt/1.5.12-2006-07-14 |
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