This is a static copy of a profile reportHome
scribe.legend.methods>update_userdata (14 calls, 0.022 sec)
Generated 05-Aug-2011 13:02:00 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/scribe/@scribe/@legend/methods.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
585 | pos = get(h,'Position'); | 14 | 0.011 s | 50.0% |  |
565 | ud.legendpos = getnpos(h); | 14 | 0.011 s | 50.0% |  |
587 | setappdata(double(h),'LegendOl... | 14 | 0 s | 0% |  |
586 | siz = hgconvertunits(fig,pos,g... | 14 | 0 s | 0% |  |
582 | if ~strcmp(get(fig,'Type'),'fi... | 14 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.022 s | 100% | |
Children (called functions)
Code Analyzer results
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 26 |
Non-code lines (comments, blank lines) | 6 |
Code lines (lines that can run) | 20 |
Code lines that did run | 15 |
Code lines that did not run | 5 |
Coverage (did run/can run) | 75.00 % |
Function listing
time calls line
562 function update_userdata(h)
563
14 564 ud.PlotHandle = double(h.Axes);
0.01 14 565 ud.legendpos = getnpos(h);
14 566 ud.LegendPosition = get(double(h),'position');
14 567 ud.LabelHandles = [double(h.ItemText)' double(h.ItemTokens)']';
14 568 if ~isempty(h.PlotChildren) && ~isa(h.Plotchildren(1),'scribe.legendinfo')
14 569 ud.handles = double(h.Plotchildren);
570 else
571 % legend with legendinfo specs only require handle handles
572 ud.handles = h.Plotchildren;
573 end
14 574 ud.lstrings = h.String';
14 575 ud.LegendHandle = double(h);
14 576 set(double(h),'UserData',ud);
577
578 %also update the LegendOldSize appdata
579 % this appdata is also set in init/setWidthHeight
14 580 parent = get(h,'Parent');
14 581 fig = parent;
14 582 if ~strcmp(get(fig,'Type'),'figure')
583 fig = ancestor(fig,'figure');
584 end
0.01 14 585 pos = get(h,'Position');
14 586 siz = hgconvertunits(fig,pos,get(h,'Units'),'points',parent);
14 587 setappdata(double(h),'LegendOldSize',siz(3:4));
Other subfunctions in this file are not included in this listing.