http://igraph.org/python/doc/igraph.Graph-class.html#layout_bipartite

Gabor

On Fri, Jul 18, 2014 at 10:37 PM, Pagliari, Roberto
<[email protected]> wrote:
> Yes you are right... but I was wondering if there is a built-in function to 
> plot a bipartite graph in the usual fashion they are shown, namely, with 
> edges over two columns, connected by edges....
>
> Thank you
>
> -----Original Message-----
> From: Tamás Nepusz [mailto:[email protected]]
> Sent: Friday, July 18, 2014 6:08 PM
> To: Help for igraph users; Pagliari, Roberto
> Subject: Re: [igraph] drawing bipartite weighted graphs [Python]
>
>> 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.
> _______________________________________________
> igraph-help mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/igraph-help

_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to