igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Draw vertices in a certain order


From: Gábor Csárdi
Subject: Re: [igraph] Draw vertices in a certain order
Date: Mon, 6 Oct 2014 09:16:54 -0400

Hi, here is an example that puts higher degree nodes last:
https://lists.nongnu.org/archive/html/igraph-help/2013-02/msg00095.html

Gabor

On Mon, Oct 6, 2014 at 4:22 AM, Hugues François
<address@hidden> wrote:
> Hi,
>
> Thanks for your answer. It seems to be what I am looking for but 
> unfortunately, the results looks like I just threw vertices randomly :/
>
> Below, you will find what I tried. Where am I wrong ?
>
> Thanks,
>
> Hug
>
> vorder <- data.frame(
>         vnames=character(nrow(data)),
>         vrank=integer(nrow(data)),
>         vdegree=integer(nrow(data)),
>         vorder=integer(nrow(data)),
>         stringsAsFactors=FALSE)
> vorder[,1]<-V(g)$name
> vorder[,2]<-V(g)$number
> vorder[,3]<-V(g)$degree
> vorder<-vorder[order(-vorder[,2], vorder[,3]),]
> vorder[,4]<-seq(1,nrow(data))
> vorder<-vorder[order(vorder[,1]),]
>
> g <- permute.vertices(g, vorder[,4])
>
>
> -----Message d'origine-----
> De : address@hidden [mailto:address@hidden De la part de Gábor Csárdi
> Envoyé : lundi 6 octobre 2014 08:40
> À : Help for igraph users
> Objet : Re: [igraph] Draw vertices in a certain order
>
> Hi, permute them with permute.vertices() before the plotting. This is 
> currently the only way to do it, as you cannot specify the order for plot().
>
> Gabor
>
> On Mon, Oct 6, 2014 at 2:32 AM, Hugues François <address@hidden> wrote:
>> Hello,
>>
>> I have a graph with numerous vertices (215), plot from an adjacency matrix. 
>> Some vertices overlap others. I have a rank attribute that I would like to 
>> use for ordering plotting order to show important vertices (firstly draw 
>> rank 4 vertices, then rank 3, then rank2, etc.). If there a way to achieve 
>> that I didn't find it ?
>>
>> Regards,
>>
>> Hug
>>
>> _______________________________________________
>> igraph-help mailing list
>> address@hidden
>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help



reply via email to

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