File: _axis.sci

package info (click to toggle)
scilab-plotlib 0.41-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,196 kB
  • sloc: xml: 3,308; makefile: 15
file content (43 lines) | stat: -rw-r--r-- 838 bytes parent folder | download | duplicates (2)
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
function vect=_axis(varargin)
  
cmd=[];
i=1;
ax=get('current_axes');
while i<=length(varargin)
   if typeof(varargin(i))=='pltlibH'
     if varargin(i).handle.type=='Axes'
      ax=varargin(i).handle;
     else
      _error('axis : handle should be an axes handle')
     end
     i=i+1;
   else
     out=parseAxis('axis',varargin(i),'axis','')
     cmd=varargin(i);
     i=i+1;
     break;
   end 
end

if i<= length(varargin)
   _error('axis : too many input arguments')
end

if ~exists('out','local')
  vect=ax.data_bounds;
  vect=vect(:);
  return;
end

if cmd=='tight'
  XLim=_pretty_lims(ax.user_data.data_bounds(1:2),%t);
  YLim=_pretty_lims(ax.user_data.data_bounds(3:4),%t);
  ZLim=_pretty_lims(ax.user_data.data_bounds(5:6),%t);
  out=list('XLim',XLim,'YLim',YLim,'ZLim',ZLim);
end

_update_axes(ax,out);

vect=[];

endfunction