Guys

added the "print p" statement and found that there was only one path being 
stroked.  Further investigation of the code showed that I did not reset the 
"prev_poly" variable when a new polygon was encountered so all the program 
did was to initialise the path p with a "moveto" statement everytime it 
read a new line.  Corrected this and the dots are joined just fine!  Thanks 
for your help!!

Best regards

Alun Griffiths

At 13:45 09/06/2006, Michael J Gruber wrote:
>Etrade Griffiths venit, vidit, dixit 2006-06-09 12:58:
> > Hi
> >
> > sorry if this is seems a trivial request but I am trying to read a set of
> > polygons from file and plot them using PyX.  PyX runs OK (ie no errors) 
> but
> > nothing appears on the canvas!  The file contains data in this form
> >
> > poly_1, x0, y0
> > poly_1, x1, y1
> > ...
> > poly_2, x0, y0
> >
> > Here is a code snippet
>...
>
>Make sure you check the parts you didn't show us: the parsing of the
>input (comparing poly identifiers) and the handling of the very first
>and very last points. I'll attach some (ugly) code that works here,
>using the same structure you're trying to use.




_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user

Reply via email to