Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: Français - Português - 日本語 - Русский

Please note that the recommended version of Scilab is 6.1.0. This page might be outdated.
See the recommended documentation of this function

Scilab help >> Graphics > polygon > xpoly


draw a polyline or a polygon

Calling Sequence

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



matrices of the same size (points of the polyline).


string (drawing style). default value is "lines".


integer. If close=1, the polyline is closed; default value is 0.


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.



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

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

See Also

  • xfpoly — fill a polygon
  • xfpolys — fill a set of polygons
  • xpolys — draw a set of polylines or polygons
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Oct 01 17:34:55 CEST 2012