igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] showing node labels in a plot


From: Gábor Csárdi
Subject: Re: [igraph] showing node labels in a plot
Date: Fri, 19 Dec 2008 09:21:28 +0100

Hi,

plot(g, vertex.label=V(g)$name)

Or you can do

V(g)$label <- V(g)$name

and then the names are used automatically. (But if you change the
names, then you'll have to do update the labels as well.)

Best,
Gabor

ps. please consider subscribing the igraph-help list, otherwise your
messages will be delayed, I have acknowledge them manually. This is
not to annoy you, but to avoid spam. Thanks.

On Fri, Dec 19, 2008 at 1:07 AM, Rajarshi Guha <address@hidden> wrote:
> Hi, I'm reading in a graph using the ncol format. The file lists the node
> labels as
>
> n1234 n23434
> n445 n4545
>
> If I do V(g)$name I get the node labels but when I plot the graph the nodes
> are labeled with numeric ID's start from 1.
>
> Is there a way to get the plot command to show the node labels rather than
> numeric ID's?
>
> Thanks,
>
> -------------------------------------------------------------------
> Rajarshi Guha  <address@hidden>
> GPG Fingerprint: D070 5427 CC5B 7938 929C  DD13 66A1 922C 51E7 9E84
> -------------------------------------------------------------------
> All the evidence concerning the universe has not yet been collected,
> so there's still hope.
>
>
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>



-- 
Gabor Csardi <address@hidden>     UNIL DGM




reply via email to

[Prev in Thread] Current Thread [Next in Thread]