File: Matplot1.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 (55 lines) | stat: -rw-r--r-- 1,267 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Matplot1          Scilab Group          Scilab Function            Matplot1
NAME
   Matplot1 - 2D plot of a matrix using colors 
  
CALLING SEQUENCE
 Matplot1(a,rect)
PARAMETERS
 a   : real matrix of size (n1,n2).
     
 rect
      : [xmin;ymin,xmax,ymax]
     
DESCRIPTION
   The entries of matrix int(a) are used as colormap entries in  the current
  colormap. rect specify a rectangle in the  current scale and the matrix
  is drawn inside this rectangle. Each matrix entry will be rendered as a
  small rectangle filled with its  associated color. 
  
EXAMPLE
 //--- first example
 //  fix current scale 
 xsetech(frect=[0,0,10,10])
 xrect(0,10,10,10)
 a=5*ones(11,11); a(2:10,2:10)=4; a(5:7,5:7)=2;
 // first matrix in rectangle [1,1,3,3]
 Matplot1(a,[1,1,3,3])
 a=ones(10,10); a= 3*tril(a)+ 2*a; 
 // second matrix in rectangle [5,6,7,8]
 Matplot1(a,[5,6,7,8])
 xset('default')
 xbasc()
 //--- second example 
 xsetech(frect=[0,0,10,10])
 xrect(0,10,10,10)
 n=100;
 xset('pixmap',1)
 driver('X11');
 for k=-n:n,
   a=ones(n,n);
   a= 3*tril(a,k)+ 2*a;
   a= a + a';
   k1= 3*(k+100)/200;
   Matplot1(a,[k1,2,k1+7,9])
   xset('wshow')
   xset('wwpc')
 end
 xset('pixmap',0)
 xset('default')
 xbasc()
SEE ALSO
   colormap, plot2d, Matplot
  
AUTHOR
   J.Ph.C.