Hi Kek,For data laid out like that I think it would be better to read it in on a grid. With four vertices per polygon and say 100 polygons you might then use:
def axis/x=1:100:1 xax ;def axis/y=1:4:1 yax ; def grid/x=xax/y=yax grd file/g=grd/var=xx,yy/col=8/ord=yx testpoly.d poly/line=2/coord=y xx,yyThis will draw all the polygons with a red line perimeter. The important step here is to get the reading order right - that is the purpose of the "var=xx,yy/col=8/ord=yx" in the "file" command which says to read all four pairs from a record arranged as x1,y1,x2,y2,x3,y3,x4,y4 like in your situation.
Good luck, Mick ------- hengkek@xxxxxxxxxx wrote:
Hi allI have an ascii file with 8 columns and multiple rows in the following format:x1 y1 x2 y2 x3 y3 x4 y4 ... where (x1,y1) thru (x4,y4) are vertices of polygons I'd like to plot.I'm not sure how to form the arrays to use POLYGON. I.e. what to do after "FILE/VAR=X1,Y1,X2,Y2,X3,Y3,X4,Y4 MYFILE.TXT"?Thanks for any tips. Sincerely Kek