Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.4.1 - English

Change language to:
Français - 日本語 - Português - Русский

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

Scilab help >> Graphics > polygon > xfpoly

xfpoly

fill a polygon

Calling Sequence

xfpoly(xv,yv,[fill])

Arguments

xv,yv

two vectors of same size (the points of the polygon).

fill

integer, the color used to fill the polygon.

Description

xfpoly fills a polygon with the current color or a color specified by the optional fill argument.

If fill is omitted, the polygon is filled with the current color and its contour is drawn with the current color and line style. If fill is present, it is used to fill the polygon as follows:

  • if fill<0, the polygon is filled with the color -fill, and its contour is not drawn.

  • if fill=0, the polygon is filled with the current color and its contour is drawn with the current color and line style (equivalent to fill omitted).

  • if fill>0, the polygon is filled with the color fill and its contour is drawn with the current color and line style.

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);
xfpoly(x,y);

e=gce(); // get the current entity (the last created: here the polyline)
e.fill_mode='off'; // shows only the contour

delete(e);

// Create a new polygon filled with color 3
// and its contour drawn with the current color
xfpoly(x,y,3);

See Also

  • xfpolys — fill a set of polygons
  • xpoly — draw a polyline or a polygon
  • xpolys — draw a set of polylines or polygons
Report an issue
<< polyline properties polygon xfpolys >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Apr 02 17:36:23 CEST 2013