igraph-help
[Top][All Lists]
Advanced

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

[igraph] Bidirectional edges in Python


From: Gábor Tóth
Subject: [igraph] Bidirectional edges in Python
Date: Mon, 20 Jan 2014 12:02:27 +0000

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



reply via email to

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