igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] add edges in python igraph


From: Tamas Nepusz
Subject: Re: [igraph] add edges in python igraph
Date: Mon, 19 Jan 2009 12:13:31 +0000

> is it possible to set also the color of the new edge?
You can make use of the undocumented igraph feature that the newly added
edge always has the largest ID. So, this should work:

max_edge_id = g.ecount()
g.add_edges((1,2))
g.es[max_edge_id]["color"] = "blue"

(Hmm, actually, there should be a better way to add an edge with
attributes. Maybe some keyword arguments to add_edges. I have to think
about it).

-- 
Tamas






reply via email to

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