[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] Bidirectional edges in Python
From: |
Tamás Nepusz |
Subject: |
Re: [igraph] Bidirectional edges in Python |
Date: |
Mon, 20 Jan 2014 13:48:27 +0100 |
Hi,
Use edge_curved=False as a keyword argument to plot() or add it to your
visual_style dict.
--
T.
On Monday, 20 January 2014 at 13:02, Gábor Tóth wrote:
> Dear All,
>
> I need to represent two directional information flow, and I would not like to
> use parallel edges, I am wondering if I can make bidirectional edges in
> Python. For instance a simple test code, how should I rewrite it so that the
> edge between kaka and hah be bidirectional?
>
>
> from igraph import *
>
>
> g = Graph()
>
>
> g.to_directed()
>
>
> g.add_vertex('kaka')
>
>
> g.add_vertex('hah')
>
>
> g.add_edges(("kaka","hah"))
>
>
> g.add_edges(("hah","kaka"))
>
>
> visual_style = {}
>
>
> visual_style["vertex_label"] = g.vs["name"]
>
>
> layout = g.layout("kamada_kawai")
>
>
> plot(g, **visual_style)
>
>
>
>
>
>
> print g.summary()
>
>
>
>
>
>
> Thanks,
>
>
>
>
>
>
> Gabor
>
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden (mailto:address@hidden)
> https://lists.nongnu.org/mailman/listinfo/igraph-help