[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] coloring nodes according to components in a graph
From: |
Simone Gabbriellini |
Subject: |
Re: [igraph] coloring nodes according to components in a graph |
Date: |
Thu, 4 Nov 2010 11:36:41 +0100 |
Gabor,
untested but absolutely working!!! thanks a lot!
I am now using plot() on a community structure, just to say that the automatic
coloring is amazing!
best,
Simone
Il giorno 03/nov/2010, alle ore 17.57, Gábor Csárdi ha scritto:
> Simone,
>
> plot(g, vertex.color=clusters(g)$membership+1)
>
> or if you want a custom color bar, then
>
> colbar <- heat.colors(40) # say, or you can check the number of components
> plot(g, vertex.color=colbar[clusters(g)$membership+1])
>
> Untested, sorry about that.
>
> Best,
> Gabor
>
> On Wed, Nov 3, 2010 at 5:28 PM, Simone Gabbriellini
> <address@hidden> wrote:
>> Hello list,
>>
>> I've seen the python example for coloring nodes in a graph according to
>> clusters.
>> Could you give me a hand in translating the code for R?
>>
>> thanks,
>> Simone
>>
>>
>> _______________________________________________
>> igraph-help mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/igraph-help
>>
>
>
>
> --
> Gabor Csardi <address@hidden> UNIL DGM
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help