File: xaxis.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 (45 lines) | stat: -rw-r--r-- 1,586 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
xaxis            Scilab Group            Scilab Function              xaxis
NAME
   xaxis - draw an axis 
  
CALLING SEQUENCE
 xaxis(alpha,nsteps,size,init)
PARAMETERS
 alpha    : real, slope in degree of the axis.
          
 nsteps   : real vector of size 2, number of big and small intervals.
          
 size     : real vector of size 3, size of the small intervals, and small
          and big tics.
          
 init     : real vector of size 2, origin of the axis.
          
DESCRIPTION
   xaxis draws an axis.   The direction of the axis is given by alpha in
  degree.   init=[x0 y0] is the initial point of the axis.  nsteps=[n1,n2]
  gives the  number of big and small intervals separated by tics. 
  size=[s1,s2,c1] where s1 gives  the size of the small intervals, s2 gives
  the size of the small tics  along the axis and  s2*c1 gives the size of
  the big tics. All the sizes are given using the current x-scale and
  y-scale and are given as dimensions along the drawn axis.
  
             example : n1=3, n2=2, alpha=0
                     (s2*c1) 
             |     (s2)   |            |           |
             |______|_____|_____|______|_____|_____|
                s1
EXAMPLE
 x=[-%pi:0.1:%pi]';
 // plot without axis
 plot2d(x,sin(x),1,"010"," ",[-4 -1 4 1])
 // draw x axis
 xpoly([-4 4],[0 0],"lines")
 xaxis(0,[2 2],[2 0.1 3],[-4 0])
 xstring(-4.1,-0.25,"-4"); xstring(-0.2,-0.1,"0"); xstring(4,-0.25,"4")
 // draw y axis
 xpoly([0 0],[-1 1],"lines")
 xaxis(90,[2 2],[0.5 0.025 3],[0 1])
 xstring(-0.5,-1.05,"-1"); xstring(-0.35,0.95,"1")
AUTHOR
   J.Ph.C.