[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] Simple syntax questions
From: |
Gábor Csárdi |
Subject: |
Re: [igraph] Simple syntax questions |
Date: |
Mon, 13 Apr 2009 20:51:20 +0200 |
On Mon, Apr 13, 2009 at 8:42 PM, Jeff G <address@hidden> wrote:
> Wondering if I could get an example. :-) I've been struggling to figure it
> out.
> Similar to
> http://igraph.sourceforge.net/igraphbook/igraphbook-creating.html#id2569368
> but in Python.
This is not really an answer to your questions, just for the records,
that example would be way simpler with the 'vertices' argument of the
graph.data.frame() function.
Gabor
> I'm use to NetworkX, which makes it pretty easy - g.add_edge() or
> g.add_node().
> It seems igraph wants you to tell how many nodes you have before you can
> create an edge. Is this correct? I have no idea, I just want to say "x" is
> related to "y" and it creates two nodes and one edge. I then want to say
> "y" is related to "z" and it creates a "z" node, and a new edge. I also
> want to be able to say that x is "red", y is "blue" and in category "xyz".
> I want to tell it that the label and color of the edge between "y" and "z"
> is "this" and "that". I'm pulling from a database and I have a loop ready
> to go that says "x" (cat xyz, color blue) is related to "y" (cat abc, color
> red), next record, "y" is related to "z". It all seems simple, but I can't
> figure out how to make it happen.
>
> Thanks, Jeff
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>
>
--
Gabor Csardi <address@hidden> UNIL DGM