This is a static copy of a profile reportHome
scribe.legend.methods>getsizeinfo (143 calls, 0.230 sec)
Generated 05-Aug-2011 13:01:37 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 |
632 | strsizes(k,:) = strsize(h,ppos... | 491 | 0.186 s | 81.0% |  |
633 | end | 491 | 0.011 s | 4.8% |  |
622 | fname = get(ax,'fontname'); fs... | 143 | 0.011 s | 4.8% |  |
621 | ax = double(h); | 143 | 0.011 s | 4.8% |  |
619 | ppos = hgconvertunits(fig,get(... | 143 | 0.011 s | 4.8% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.230 s | 100% | |
Children (called functions)
Code Analyzer results
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 32 |
Non-code lines (comments, blank lines) | 7 |
Code lines (lines that can run) | 25 |
Code lines that did run | 25 |
Code lines that did not run | 0 |
Coverage (did run/can run) | 100.00 % |
Function listing
time calls line
615 function out = getsizeinfo(h)
616
143 617 parent = get(h,'Parent');
143 618 fig = ancestor(h,'figure');
0.01 143 619 ppos = hgconvertunits(fig,get(parent,'Position'),get(parent,'Units'),...
620 'points',get(parent,'Parent'));
0.01 143 621 ax = double(h);
0.01 143 622 fname = get(ax,'fontname'); fsize = get(ax,'fontsize');
143 623 fangl = get(ax,'fontangle'); fwght = get(ax,'fontweight');
143 624 interp = get(ax,'Interpreter');
143 625 strings = h.String;
143 626 if isempty(strings), strings{end+1} = 'data1'; end
627 % get normalized (to figure/overlay) sizes of all strings
143 628 strsizes = ones(length(strings),2);
143 629 for k=1:length(strings)
491 630 str = strings{k};
491 631 if isempty(str), str = 'Onj'; end
0.19 491 632 strsizes(k,:) = strsize(h,ppos,fname,fsize,fangl,fwght,interp,str);
0.01 491 633 end
634 % space sizes in/around legend:
635
143 636 topspace = 2; out.topspace = topspace/ppos(4);
143 637 rowspace = 0.5; out.rowspace = rowspace/ppos(4);
143 638 botspace = 2; out.botspace = botspace/ppos(4);
143 639 leftspace = 6; out.leftspace = leftspace/ppos(3);
143 640 rightspace = 3; out.rightspace = rightspace/ppos(3);
143 641 tokentotextspace = 3; out.tokentotextspace = tokentotextspace/ppos(3);
143 642 colspace = 5; out.colspace = colspace/ppos(3);
143 643 out.tokenwidth = h.itemTokenSize(1)/ppos(3);
644 % spaces between legend and axes
143 645 laxspace = 5; out.xlaxspace = laxspace/ppos(3); out.ylaxspace = laxspace/ppos(4);
143 646 out.strsizes = strsizes;
Other subfunctions in this file are not included in this listing.