Question about drawing simple graph in Python?

Bengt Richter bokr at oz.net
Fri Nov 8 00:59:56 EST 2002


On Thu, 7 Nov 2002 20:37:43 -0800 (PST), Mindy <csshi99 at yahoo.com> wrote:

>I have two lists, say:
>list1 = ['s1','s2','s1','s3'...]
>list2 = ['t1','t2','t3','t3'...]
>
>I want to draw a simple graph, with 's1' points to
>'t1', which means drawing one line between 's1' and
>'s2' and an arrow pointed to 't1'. (for i in
>range(len(list1), there's an edge between list1[i] and
>list2[i]). So how to draw this graph in Python? I
>searched on google but didn't find some easy way to
>implement this. Thanks for any hints!
>
First of all, I suspect you have some typos. Second, you
don't say how a string like 's1' or 't1' is supposed to
be translated to end point coordinates of an 'edge'. Do
you have a dictionary of coordinates?

Third, there's no clue as to what you are using or hope
to use for drawing. tkinter? PIL?

Your other post is even less clear to me. Pretend you are
someone else reading your stuff carefully, but knowing
_nothing_ about your situation to start with.

Regards,
Bengt Richter



More information about the Python-list mailing list