[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] Labelling vertices with name while plotting graph
From: |
Gabor Csardi |
Subject: |
Re: [igraph] Labelling vertices with name while plotting graph |
Date: |
Wed, 13 Jun 2007 09:58:58 +0200 |
User-agent: |
Mutt/1.5.12-2006-07-14 |
On Tue, Jun 12, 2007 at 11:28:45PM +0200, address@hidden wrote:
> > ...vertex labels can be controlled by either the "label" attribute
> > attached to the vertices (and not "name" as written in the webpage you
> > mentioned - it might be a little bit out of date)
>
> PS : when I read a graph using :
>
> m <- read.table("foo.txt");
> g1 <- graph.data.frame(m);
>
> with m containing a list of edges :
>
> var1 var2 weight
> a rien 2.0
> a ignorant 1.0
> a alphabet 1.0
> a lettre 1.0
>
> The constructor create an attribute "name" on vertices. Isn'it inconsistent?
Sylvian, you might call it inconsistent, the 'name' of the vertices is
not neccessarily the same as their 'label' depending what one means on
'name' and 'label'. You can always do V(g1)$label <- V(g1)$name or call
plot with vertex.label=V(g)$name if you like.
I agree that most times it would be good to use the same attribute,
but then it would be impossible to have different default values for printing
and plotting. Anyway, i think i'll leave it like that, it's
not worth changing it and creating more confusion.
Btw. you might find some more little "irritating" things in igraph
(this is beta software and constantly under development),
please report them (if you like). Thanks.
Btw2. igraphbook is a bit out date, but not very much, only the plotting
arguments are a bit different now (and much better i would say).
Gabor
> Sylvain
>
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
--
Csardi Gabor <address@hidden> MTA RMKI, ELTE TTK