[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] drawing bipartite weighted graphs [Python]
From: |
Gábor Csárdi |
Subject: |
Re: [igraph] drawing bipartite weighted graphs [Python] |
Date: |
Fri, 18 Jul 2014 23:11:43 -0400 |
http://igraph.org/python/doc/igraph.Graph-class.html#layout_bipartite
Gabor
On Fri, Jul 18, 2014 at 10:37 PM, Pagliari, Roberto
<address@hidden> 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:address@hidden
> 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
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help