This is a static copy of a profile reportHome
scribe.legend.init>setWidthHeight (1 call, 0.000 sec)
Generated 28-Feb-2011 19:18:48 using cpu time.
M-subfunction in file /Applications/MATLAB_R2010a.app/toolbox/matlab/scribe/@scribe/@legend/init.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Lines where the most time was spent
No measurable time spent in this functionLine Number | Code | Calls | Total Time | % Time | Time Plot |
248 | if ishandle(h) && strc... | 1 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0 s | 0% | |
Children (called functions)
No childrenM-Lint results
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 34 |
Non-code lines (comments, blank lines) | 2 |
Code lines (lines that can run) | 32 |
Code lines that did run | 1 |
Code lines that did not run | 31 |
Coverage (did run/can run) | 3.12 % |
Function listing
time calls line
247 function setWidthHeight(hSrc,eventData,h) %#ok
1 248 if ishandle(h) && strcmp(get(h,'Units'),'normalized') && ...
249 any(strcmp(get(h,'Location'),{'none','Best'}))
250 if ~isempty(h.Axes) && ~isempty(getappdata(double(h.Axes),'inLayout')), return; end
251 pos = get(h,'Position');
252 oldsize = getappdata(double(h),'LegendOldSize');
253 parent = get(h,'Parent');
254 fig = parent;
255 if ~strcmp(get(fig,'Type'),'figure')
256 fig = ancestor(fig,'figure');
257 end
258 if isempty(oldsize)
259 oldsize = pos(3:4);
260 else
261 oldsize = hgconvertunits(fig,[0 0 oldsize],'points',get(h,'Units'),parent);
262 oldsize = oldsize(3:4);
263 end
264 siz = max(methods(h,'getsize'),oldsize);
265 if any(abs(siz-pos(3:4)) > 1e-10)
266 center = pos(1:2)+pos(3:4)/2;
267 pos = [center-siz/2 siz];
268 listen = h.PropertyListeners;
269 if ~isempty(listen)
270 oldstate = get(listen,'enable');
271 set(listen,'enable','off');
272 end
273 set(h,'Position',pos);
274 if ~isempty(listen)
275 set(listen,{'enable'},oldstate);
276 end
277 end
278 siz = hgconvertunits(fig,pos,get(h,'Units'),'points',parent);
279 setappdata(double(h),'LegendOldSize',siz(3:4));
280 end
Other subfunctions in this file are not included in this listing.