igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Vertex colors in tkplot


From: Gábor Csárdi
Subject: Re: [igraph] Vertex colors in tkplot
Date: Wed, 14 Dec 2011 13:50:58 -0500

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=layout.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



reply via email to

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