This is a static copy of a profile report

Home

axis (112 calls, 0.328 sec)
Generated 15-Mar-2007 12:01:45 using real time.
M-function in file C:\Program Files\MATLAB71\toolbox\matlab\graph2d\axis.m
[Copy to new window for comparing multiple runs]

Parents (calling functions)

Function NameFunction TypeCalls
get_top_2ideasM-function1
see_mind_picM-function3
see_mind_domM-function4
legacyM-function10
see_mindM-function90
see_mind_germM-function4
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
153
set(get(ax(j),'Title'),'Visibl...
770.234 s71.4%
78
elseif isempty(varargin)
1120.031 s9.5%
64
ax = gca;
1120.031 s9.5%
112
set(ax(j),...
350.016 s4.8%
92
cur_arg = varargin{i};
1120.016 s4.8%
Other lines & overhead  0 s0%
Totals  0.328 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
gcaM-function1120.031 s9.5%
Self time (built-ins, overhead, etc.)  0.297 s90.5%
Totals  0.328 s100% 
M-Lint results
No M-Lint messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in file196
Non-code lines (comments, blank lines)124
Code lines (lines that can run)72
Code lines that did run31
Code lines that did not run41
Coverage (did run/can run)43.06 %
Function listing
   time   calls  line
1 function [ans1, ans2, ans3] = axis(varargin)
2 %AXIS Control axis scaling and appearance.
3 % AXIS([XMIN XMAX YMIN YMAX]) sets scaling for the x- and y-axes
4 % on the current plot.
5 % AXIS([XMIN XMAX YMIN YMAX ZMIN ZMAX]) sets the scaling for the
6 % x-, y- and z-axes on the current 3-D plot.
7 % AXIS([XMIN XMAX YMIN YMAX ZMIN ZMAX CMIN CMAX]) sets the
8 % scaling for the x-, y-, z-axes and color scaling limits on
9 % the current axis (see CAXIS).
10 % V = AXIS returns a row vector containing the scaling for the
11 % current plot. If the current view is 2-D, V has four
12 % components; if it is 3-D, V has six components.
13 %
14 % AXIS AUTO returns the axis scaling to its default, automatic
15 % mode where, for each dimension, 'nice' limits are chosen based
16 % on the extents of all line, surface, patch, and image children.
17 % AXIS MANUAL freezes the scaling at the current limits, so that if
18 % HOLD is turned on, subsequent plots will use the same limits.
19 % AXIS TIGHT sets the axis limits to the range of the data.
20 % AXIS FILL sets the axis limits and PlotBoxAspectRatio so that
21 % the axis fills the position rectangle. This option only has
22 % an effect if PlotBoxAspectRatioMode or DataAspectRatioMode are
23 % manual.
24 %
25 % AXIS IJ puts MATLAB into its "matrix" axes mode. The coordinate
26 % system origin is at the upper left corner. The i axis is
27 % vertical and is numbered from top to bottom. The j axis is
28 % horizontal and is numbered from left to right.
29 % AXIS XY puts MATLAB into its default "Cartesian" axes mode. The
30 % coordinate system origin is at the lower left corner. The x
31 % axis is horizontal and is numbered from left to right. The y
32 % axis is vertical and is numbered from bottom to top.
33 %
34 % AXIS EQUAL sets the aspect ratio so that equal tick mark
35 % increments on the x-,y- and z-axis are equal in size. This
36 % makes SPHERE(25) look like a sphere, instead of an ellipsoid.
37 % AXIS IMAGE is the same as AXIS EQUAL except that the plot
38 % box fits tightly around the data.
39 % AXIS SQUARE makes the current axis box square in size.
40 % AXIS NORMAL restores the current axis box to full size and
41 % removes any restrictions on the scaling of the units.
42 % This undoes the effects of AXIS SQUARE and AXIS EQUAL.
43 % AXIS VIS3D freezes aspect ratio properties to enable rotation of
44 % 3-D objects and overrides stretch-to-fill.
45 %
46 % AXIS OFF turns off all axis labeling, tick marks and background.
47 % AXIS ON turns axis labeling, tick marks and background back on.
48 %
49 % AXIS(H,...) changes the axes handles listed in vector H.
50 %
51 % See also AXES, GRID, SUBPLOT, XLIM, YLIM, ZLIM.
52
53 % Copyright 1984-2005 The MathWorks, Inc.
54 % $Revision: 5.49.4.5 $ $Date: 2005/06/21 19:29:30 $
55
56 %get the list of axes to operate upon
112 57 if length(varargin) > 0 && ...
58 all(ishandle(varargin{1})) && ...
59 all(strcmp(get(varargin{1},'type'),'axes'))
60
61 ax = varargin{1};
62 varargin=varargin(2:end);
112 63 else
0.03 112 64 ax = gca;
112 65 end
66
< 0.01 112 67 ans1set = false;
< 0.01 112 68 pbarlimit = 0.1;
69
70 %---Check for bypass option (only supported for single axes)
112 71 if length(ax)==1 && isappdata(ax,'MWBYPASS_axis')
72 if isempty(varargin)
73 ans1 = mwbypass(ax,'MWBYPASS_axis');
74 ans1set = true;
75 else
76 mwbypass(ax,'MWBYPASS_axis',varargin{:});
77 end
0.03 112 78 elseif isempty(varargin)
79 if length(ax)==1
80 ans1=LocGetLimits(ax);
81 ans1set = true;
82 else
83 ans1=cell(length(ax),1);
84 ans1set = true;
85 for i=1:length(ax)
86 ans1{i}=LocGetLimits(ax(i));
87 end
88 end
112 89 else
112 90 for j=1:length(ax)
112 91 for i = 1:length(varargin)
0.02 112 92 cur_arg = varargin{i};
93
94 % Set limits manually with 4/6/8 element vector
112 95 if isnumeric(cur_arg)
96 LocSetLimits(ax(j),cur_arg);
97
98 % handle AUTO, AUTO[XYZ]:
112 99 elseif strcmp(cur_arg(1:min(4,length(cur_arg))),'auto')
100 LocSetAuto(ax(j),cur_arg);
101
102 % handle TIGHT
112 103 elseif(strcmp(cur_arg,'tight'))
104 LocSetTight(ax(j));
105
106 % handle FILL:
112 107 elseif(strcmp(cur_arg, 'fill'))
108 LocSetFill(ax(j),pbarlimit);
109
110 % handle MANUAL:
112 111 elseif(strcmp(cur_arg, 'manual'))
0.02 35 112 set(ax(j),...
113 'XLimMode','manual',...
114 'YLimMode','manual',...
115 'ZLimMode','manual');
116
117 % handle IJ:
77 118 elseif(strcmp(cur_arg, 'ij'))
119 set(ax(j),...
120 'XDir','normal',...
121 'YDir','reverse');
122
123 % handle XY:
77 124 elseif(strcmp(cur_arg, 'xy'))
125 set(ax(j),...
126 'XDir','normal',...
127 'YDir','normal');
128
129 % handle SQUARE:
77 130 elseif(strcmp(cur_arg, 'square'))
131 set(ax(j),...
132 'PlotBoxAspectRatio',[1 1 1],...
133 'DataAspectRatioMode','auto')
134
135 % handle EQUAL:
77 136 elseif(strcmp(cur_arg, 'equal'))
137 LocSetEqual(ax(j),pbarlimit);
138
139 % handle IMAGE:
77 140 elseif(strcmp(cur_arg,'image'))
141 LocSetImage(ax(j),pbarlimit);
142
143 % handle NORMAL:
77 144 elseif(strcmp(cur_arg, 'normal'))
145 set(ax(j),...
146 'PlotBoxAspectRatioMode','auto', ...
147 'DataAspectRatioMode' ,'auto', ...
148 'CameraViewAngleMode' ,'auto');
149
150 % handle OFF:
77 151 elseif(strcmp(cur_arg, 'off'))
77 152 set(ax(j),'Visible','off');
0.23 77 153 set(get(ax(j),'Title'),'Visible','on');
154
155 % handle ON:
156 elseif(strcmp(cur_arg, 'on'))
157 set(ax(j),'Visible','on');
158
159 % handle VIS3D:
160 elseif(strcmp(cur_arg,'vis3d'))
161 set(ax(j),...
162 'CameraViewAngle', get(ax(j),'CameraViewAngle'),...
163 'DataAspectRatio', get(ax(j),'DataAspectRatio'),...
164 'PlotBoxAspectRatio',get(ax(j),'PlotBoxAspectRatio'));
165
166 % handle STATE:
167 elseif(strcmp(cur_arg, 'state'))
168 warning('MATLAB:graph2d:axis:ObsoleteState',(['AXIS(''STATE'') is obsolete and', ...
169 ' will be eliminated\n in future versions.', ...
170 ' Use GET(GCA,...) instead.']));
171 %note that this will keep overwriting arg1 etc if there is more
172 %than one axes in the list
173 [ans1,ans2,ans3]=LocGetState(ax(1));
174 ans1set = true;
175
176 %if nargout>1
177 % ans2=ans2q;
178 % if nargout>2
179 % ans3=ans3q;
180 % end
181 %end
182
183 % handle ERROR (NONE OF THE ABOVE STRINGS FOUND):
184 else
185 error(['Unknown command option ''',cur_arg,'''']);
186 end
112 187 end
112 188 end
112 189 end
190
112 191 if nargout > 0 && ~ans1set
192 error(nargoutchk(0, 0, nargout));
193 end
194
195
196 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Other subfunctions in this file are not included in this listing.