[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] Vertex colors in tkplot
From: |
Chacko, George (NIH/CSR) [E] |
Subject: |
Re: [igraph] Vertex colors in tkplot |
Date: |
Wed, 14 Dec 2011 13:58:08 -0500 |
Neat! Thanks very much. GC
-----Original Message-----
From: Gábor Csárdi [mailto:address@hidden
Sent: Wednesday, December 14, 2011 1:51 PM
To: Help for igraph users
Subject: Re: [igraph] Vertex colors in tkplot
Hi,
IRG_ColorList[,2] seems to be a character vector, and tkplot() interprets this
as color names (plot() is a bit more flexible).
Convert it to numeric: vertex.color=as.numeric(IRG_ColorList[,2]).
Best,
Gabor
On Wed, Dec 14, 2011 at 1:47 PM, Chacko, George (NIH/CSR) [E] <address@hidden>
wrote:
> Hello:
>
>
>
> I am trying to assign vertex colors from a lookup table when
> visualizing graph.adjacency output in tkplot. This works using plot
> which is unfortunately not interactive.
>
>
>
> Ø plot(g1,
> vertex.label=row.names(df1),vertex.color=(IRG_ColorList[,2]),layout=la
> yout.fruchterman.reingold)
>
>
>
> but not with tkplot
>
>
>
> Ø tkplot(g1,
> vertex.label=row.names(df1),vertex.color=(IRG_ColorList[,2])
>
>
>
> Error in structure(.External("dotTclObjv", objv, PACKAGE = "tcltk"),
> class =
> "tclObj") :
>
> [tcl] unknown color name "1".
>
>
>
> Is this a known problem for which there is a workaround? I'd be
> grateful for any help. Thanks George Chacko
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
--
Gabor Csardi <address@hidden> MTA KFKI RMKI
_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help