Hi,
I'm using igraph recently with python on a debian system.
I succeded in creating a dendrogram and plot it :
comms = G.community_walktrap()
igraph.plot(comms, mot+"-walktrap.svg")
But i don't see how to colorize it.
I tried :
comms2=comms.as_clustering(n=5)
igraph.plot(comms2, mot+"-walktrap.svg",mark_groups = True)
It works but it's not a dendrogram because comms and comms2 are
differents objects :
type(comms) -> <class 'igraph.clustering.VertexDendrogram'>
type(comms2) -> <class 'igraph.clustering.VertexClustering'>
So i tried :
G1,G2,G3,G4,G5=comms2.subgraphs()
dict={}
dict['red']=G1.get_edgelist()
dict['green']=G2.get_edgelist()
dict['blue']=G3.get_edgelist()
dict['yellow']=G4.get_edgelist()
dict['magenta']=G5.get_edgelist()
and :
igraph.plot(comms, mot+"-walktrap.svg",mark_groups = dict)
but the plot still is black and white ...
Any idea ?
Thanks for your help
best,
L Chardon
--
logo_crisco Laurette CHARDON
*Ingénieure de Recherche informatique*
Service : +33(0)2 31 56 57 37
Bâtiment N3 - Sous-sol - porte SA S13 - Esplanade de la Paix
CS 14032- 14032 CAEN Cedex 5
www.crisco.unicaen.fr <http://www.crisco.unicaen.fr>
/Faites un geste pour l'environnement, n'imprimez ce mail que si
nécessaire/
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel
antivirus Avast.
https://www.avast.com/antivirus
_______________________________________________
igraph-help mailing list
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help