~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to man/graphics/drawaxis.cat

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
drawaxis          Scilab Group          Scilab Function            drawaxis
2
 
NAME
3
 
   drawaxis - draw an axis 
4
 
  
5
 
CALLING SEQUENCE
6
 
 drawaxis([options]) 
7
 
 // options: x,y,dir,sub_int,fontsize,format_n,seg,textcolor,ticscolor,tics
8
 
PARAMETERS
9
 
 dir=string
10
 
           : used to specify the tics direction. string can be chosen among  
11
 
          'u','r','d','l' and 'l' is the default value. the values
12
 
          'u','r','d','l' stands respectively for up, right, down, left
13
 
          
14
 
 tics=string
15
 
           : A flag which describes how the tics are given.   string can be chosen
16
 
          among 'v','r', and 'i', and, 'v' is the default value
17
 
          
18
 
 x,y      : two vectors which give tics positions.
19
 
          
20
 
 val= string matrix
21
 
           : A string matrix, which, when given, gives the string to be drawn along
22
 
          the axis at tics positions.
23
 
          
24
 
 fontsize=int
25
 
           : specifies the fontsize to use for displaying values along the axis.
26
 
          Default value is -1 which stands for current fontsize
27
 
          
28
 
 format_n=string
29
 
           : format to use for displaying numbers along the axis
30
 
          
31
 
 seg= 1 or 0
32
 
           : A flag which controls the display of the base segment of the axis
33
 
          (default value is 1).
34
 
          
35
 
 sub_int=integer
36
 
           : an integer which gives the number of sub-intervals to draw  between
37
 
          large tics.
38
 
          
39
 
 textcolor=integer
40
 
           : specify the color to use for displaying values along the axis. Default
41
 
          value is -1 which stands for current color.
42
 
          
43
 
 ticscolor=integer
44
 
           : specify the color to use for tics drawing. Default value is -1 which
45
 
          stands for current color.
46
 
          
47
 
DESCRIPTION
48
 
   drawaxis is used to draw an axis in vertical or horizontal  direction.
49
 
  the direction of the axis is given by dir  dir = 'u' or 'd' gives a
50
 
  horizontal axis  with tics going up ('u') or down ('d').  dir = 'r' or
51
 
  'l' give a vertical axis  with tics going right ('r') or left ('l').   x
52
 
  and y give the axis tics positions.  If the axis is horizontal then y 
53
 
  must be a scalar or can be omitted and x  is a Scilab vector. The meaning
54
 
  of x  is controlled by tics. 
55
 
  
56
 
   If tics='v' then x gives the tics positions along the x-axis. 
57
 
  
58
 
   If tics='r' then x must be of size 3. x=[xmin,xmax,n] and  n gives the
59
 
  number of intervals.
60
 
  
61
 
   If tics='i' then x must be of size 4, x=[k1,k2,a,n].  then xmin=k1*10^a,
62
 
  xmax=k2*10^a and n gives the number of intervals
63
 
  
64
 
 If y is omitted then the axis will be positioned at  the top of the frame
65
 
 if dir='u' or at the bottom if  dir='d'  By default, numbers are drawn
66
 
 along the axis. They are drawn using  a default format which can be
67
 
 changed with format_n.  It is also possible to display given strings and
68
 
 not numbers,  this is done if val is provided. The size of val must  match
69
 
 the number of tics. 
70
 
 
71
 
EXAMPLE
72
 
plot2d(1:10,1:10,1,"020")
73
 
// horizontal axis 
74
 
drawaxis(x=2:7,y=4,dir='u',tics='v')
75
 
// horizontal axis on top of the frame
76
 
drawaxis(x=2:7,dir='u',tics='v') 
77
 
// horizontal axis at the bottom of the frame
78
 
drawaxis(x=2:7,dir='d',tics='v') 
79
 
 
80
 
// horizontal axis given by a range 
81
 
drawaxis(x=[2,7,3],y=4,dir='d',tics='r') 
82
 
 
83
 
// vertical axis 
84
 
drawaxis(x=4,y=2:7,dir='r',tics='v')
85
 
drawaxis(x=2,y=[2,7,3],dir='l',tics='r')
86
 
drawaxis(y=2:7,dir='r',tics='v')
87
 
drawaxis(y=2:7,dir='l',tics='v')
88
 
 
89
 
// horizontal axis with strings displayed at tics positions
90
 
drawaxis(x=2:7,y=8,dir='u',tics='v',val='A'+string(1:6));
91
 
// vertical axis with strings displayed at tics positions
92
 
drawaxis(x=8,y=2:7,dir='r',tics='v',val='B'+string(1:6));
93
 
 
94
 
// horizontal axis given with a 'i' range. 
95
 
drawaxis(x=[2,5,0,3],y=9,dir='u',tics='i');
96
 
drawaxis(x=9,y=[2,5,0,3],dir='r',tics='i',sub_int=5);
97
 
 
98
 
// horizontal axis again 
99
 
drawaxis(x=2:7,y=4,dir='u',tics='v',fontsize=10,textcolor=9,ticscolor=7,seg=0,sub_int=20) 
100
 
AUTHOR
101
 
 J.Ph.C.
102