Scilab Function
Last update : 14/2/2006

xpoly - draw a polyline or a polygon

Calling Sequence

xpoly(xv,yv [,dtype [,close]])

Parameters

Description

xpoly draws a single polyline described by the vectors of coordinates xv and yv . If xv and yv are matrices they are considered as vectors by concatenating their columns. dtype can be "lines" for using the current line style or "marks" for using the current mark to draw the polyline.

Examples


x=sin(2*%pi*(0:4)/5);
y=cos(2*%pi*(0:4)/5);

plot2d(0,0,-1,"010"," ",[-2,-2,2,2])
xset("color",5)
xpoly(x,y,"lines",1) // by default closed

// News graphics only
e=gce(); // get the current entity (the last created: here the polyline)
e.closed = 'off' // the polyline is now open
  

See Also

xfpoly ,   xfpolys ,   xpolys ,  

Author

J.Ph.C.