Question about drawing simple graph in Python?
Anton Vredegoor
anton at vredegoor.doge.nl
Fri Nov 8 12:58:57 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
Have a look at:
http://home.hccnet.nl/a.vredegoor/cartesian/cartesian.py
It's a kind of virtual "millimeter" paper, it can be used to draw
points, line pieces and edges between points. If the "withaxes" and
"withgrid" arguments are not set to "yes" it produces the kind of
output as described above. It's not a finished product yet, maybe it's
going to end up as a function plotter, or maybe just as something to
impress mathematicians with, I don't know yet.
Since it's unfinished there are no docs, this will have to wait until
I'll release it properly. However its possible to look at it already
and it might give some idea's.
Regards,
Anton.
More information about the Python-list
mailing list