igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] drawing bipartite weighted graphs [Python]


From: Tamás Nepusz
Subject: Re: [igraph] drawing bipartite weighted graphs [Python]
Date: Sat, 19 Jul 2014 00:07:58 +0200

> I haven't found much about this. Could someone, possibly provide a 
> minimalistic example 
> about drawing a bipartite graph in python?
Errrrm.... how are bipartite graphs different from ordinary graphs when it 
comes to plotting? :) AFAIK you could simply use plot(g) to plot a graph no 
matter whether it's bipartite or not. If you want to color the nodes 
differently depending on which part of the graph they belong to, you could do 
something like:

plot(g, vertex_color=["red" if type == True else "blue" for type in 
g.vs["type"]])

(Assuming that the "type" vertex attribute contains which part of the graph the 
vertices belong to).

T.



reply via email to

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