File: xrects.cat

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (38 lines) | stat: -rw-r--r-- 1,023 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
xrects            Scilab Group            Scilab Function            xrects
NAME
   xrects - draw or fill a set of rectangles
  
CALLING SEQUENCE
 xrects(rects,[fill])
PARAMETERS
 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): rects=[x1 y1 w1
  h1;x2 y2 w2 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(n)
  
   if fill(i)=0, rectangle i is drawn using the current line style (or
  color).
  
EXAMPLE
 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
   xfrect, xrect
  
AUTHOR
   J.Ph.C.