Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.0 - 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 > geometric_shapes > xrects

xrects

draw or fill a set of rectangles

Calling Sequence

xrects(rects,[fill])

Arguments

rects

matrix of size (4,n).

fill

vector of size n.

Description

xrects draws or fills a set of rectangles. Each column of rects describes a rectangle (upper-left point, width, height) in user coordinates: rects=[x1 x2... ; y1 y2... ; w1 w2... ; h1 h2...].

fill(i) gives the pattern to use for filling or drawing rectangle i:

if fill(i)<0, rectangle i is drawn using the line style (or color) -fill(i)

if fill(i)>0, rectangle i is filled using the pattern (or color) fill(i)

if fill(i)=0, rectangle i is drawn using the current line style (or color).

Please note that height is positive downwards.
Created rectangles inherits the clip property from the current axes.

Examples

plot2d([-100,500],[-50,50],[-1,-1],"022")
cols=[-34,-33,-32,-20:5:20,32,33,34];
x=400*(0:14)/14; step=20;
rects=[x;10*ones(x);step*ones(x);30*ones(x)];
xrects(rects,cols)
xnumb(x,15*ones(x),cols)

See Also

Report an issue
<< xrect geometric_shapes handle >>

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:
Fri Apr 11 14:06:54 CEST 2014