igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] how to order vertex by the count


From: Gábor Csárdi
Subject: Re: [igraph] how to order vertex by the count
Date: Tue, 13 Nov 2012 15:29:06 -0500

See layout.star() and its order argument. It does exactly what you want, I believe.

Gabor


On Tue, Nov 13, 2012 at 11:50 AM, Mike Dylan <address@hidden> wrote:

data frame t

    Student   Played     Count
    Mike   Soccer      5
    Mike            Football        10
    Mike   Golf      15
    Mike            Hockey          2

need to create an igraph where I need to show Student in the center and Played as vertex's. I can do this by the following:

    g <- graph.data.frame(t)
    plot(g, layout = layout.kamada.kawai,  vertex.label = V(g)$name,  vertex.label.color= "darkblue",  edge.arrow.size=0.9,  edge.curved=T, edge.label=t$count, edge.label.color="#F900F9", edge.label.font=10,vertex.shape="rectangle",edge.color="darkgreen")

This works but I like to order the graph by the count. For example, vertexes for Played should be order counter-clock wise by the count. In this case Hockey should be first than, soccer etc. Can anybody help me with that?


_______________________________________________
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]