Question about drawing simple graph in Python?

Mindy csshi99 at yahoo.com
Mon Nov 11 16:58:32 EST 2002


> 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. 

Thanks so much. This really produces the graph with
edges and nodes. But I have two more questions.

1) How to stick a name to the node? For example, the
current edge is just a line like:
  ------------>
But I want there're nodes' names attached to each
node, such like:

  pt1--------->pt2

How to draw the above edge?

2) I met such situation:
I have edges (pt1,pt2) (pt2,pt3) (pt1,pt3)
But when I draw, I only get:
  pt1----->pt2------>pt3
which doesn't show there's an edge between (pt1,pt3).
Because the line between pt1 and pt2 overlaps with the
lines between pt1,pt2 and pt2,pt3. How to fix this?

THanks for more help!




=====
Cheers
-Mindy

__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2




More information about the Python-list mailing list