This is a static copy of a profile reportHome
scribe.legend.methods>update_userdata (2 calls, 0.010 sec)
Generated 18-Mar-2011 23:32:48 using cpu time.
M-subfunction in file /Applications/MATLAB_R2010a.app/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 |
564 | ud.PlotHandle = double(h.Axes)... | 2 | 0.010 s | 100.0% |  |
587 | setappdata(double(h),'LegendOl... | 2 | 0 s | 0% |  |
586 | siz = hgconvertunits(fig,pos,g... | 2 | 0 s | 0% |  |
585 | pos = get(h,'Position'); | 2 | 0 s | 0% |  |
582 | if ~strcmp(get(fig,'Type'),'fi... | 2 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.010 s | 100% | |
Children (called functions)
M-Lint 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
0.01 2 564 ud.PlotHandle = double(h.Axes);
2 565 ud.legendpos = getnpos(h);
2 566 ud.LegendPosition = get(double(h),'position');
2 567 ud.LabelHandles = [double(h.ItemText)' double(h.ItemTokens)']';
2 568 if ~isempty(h.PlotChildren) && ~isa(h.Plotchildren(1),'scribe.legendinfo')
2 569 ud.handles = double(h.Plotchildren);
570 else
571 % legend with legendinfo specs only require handle handles
572 ud.handles = h.Plotchildren;
573 end
2 574 ud.lstrings = h.String';
2 575 ud.LegendHandle = double(h);
2 576 set(double(h),'UserData',ud);
577
578 %also update the LegendOldSize appdata
579 % this appdata is also set in init/setWidthHeight
2 580 parent = get(h,'Parent');
2 581 fig = parent;
2 582 if ~strcmp(get(fig,'Type'),'figure')
583 fig = ancestor(fig,'figure');
584 end
2 585 pos = get(h,'Position');
2 586 siz = hgconvertunits(fig,pos,get(h,'Units'),'points',parent);
2 587 setappdata(double(h),'LegendOldSize',siz(3:4));
Other subfunctions in this file are not included in this listing.