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: Hugues François
Subject: Re: [igraph] Draw vertices in a certain order
Date: Mon, 6 Oct 2014 16:06:43 +0200

Hi,

Thanks again for the help. Even igraph is really powerfull, I'm unable to find 
where I'm doing something wrong... But the final result is far from what I 
expected (see attached file) even isomorphic returns 'TRUE'. I think I will 
give up for now. Does the "bug" has been reported since your last discussion 
about plotting order ?

Hug'

-----Message d'origine-----
De : address@hidden [mailto:address@hidden De la part de Gábor Csárdi
Envoyé : lundi 6 octobre 2014 15:17
À : Help for igraph users
Objet : Re: [igraph] Draw vertices in a certain order

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

_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help

Attachment: test_asgraph.jpg
Description: test_asgraph.jpg


reply via email to

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