This is a static copy of a profile reportHome
scribe.legend.methods>getsizeinfo (22 calls, 0.083 sec)
Generated 18-Mar-2011 23:32:26 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 |
632 | strsizes(k,:) = strsize(h,ppos... | 77 | 0.062 s | 75.0% |  |
624 | interp = get(ax,'Interpreter')... | 22 | 0.010 s | 12.5% |  |
622 | fname = get(ax,'fontname'); fs... | 22 | 0.010 s | 12.5% |  |
646 | out.strsizes = strsizes; | 22 | 0 s | 0% |  |
645 | laxspace = 5; out.xlaxspace = ... | 22 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.083 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
scribe.legend.methods>strsize | M-subfunction | 77 | 0.062 s | 75.0% |  |
opaque.double | M-function | 22 | 0 s | 0% |  |
Self time (built-ins, overhead, etc.) | | | 0.021 s | 25.0% |  |
Totals | | | 0.083 s | 100% | |
M-Lint 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
22 617 parent = get(h,'Parent');
22 618 fig = ancestor(h,'figure');
22 619 ppos = hgconvertunits(fig,get(parent,'Position'),get(parent,'Units'),...
620 'points',get(parent,'Parent'));
22 621 ax = double(h);
0.01 22 622 fname = get(ax,'fontname'); fsize = get(ax,'fontsize');
22 623 fangl = get(ax,'fontangle'); fwght = get(ax,'fontweight');
0.01 22 624 interp = get(ax,'Interpreter');
22 625 strings = h.String;
22 626 if isempty(strings), strings{end+1} = 'data1'; end
627 % get normalized (to figure/overlay) sizes of all strings
22 628 strsizes = ones(length(strings),2);
22 629 for k=1:length(strings)
77 630 str = strings{k};
77 631 if isempty(str), str = 'Onj'; end
0.06 77 632 strsizes(k,:) = strsize(h,ppos,fname,fsize,fangl,fwght,interp,str);
77 633 end
634 % space sizes in/around legend:
635
22 636 topspace = 2; out.topspace = topspace/ppos(4);
22 637 rowspace = 0.5; out.rowspace = rowspace/ppos(4);
22 638 botspace = 2; out.botspace = botspace/ppos(4);
22 639 leftspace = 6; out.leftspace = leftspace/ppos(3);
22 640 rightspace = 3; out.rightspace = rightspace/ppos(3);
22 641 tokentotextspace = 3; out.tokentotextspace = tokentotextspace/ppos(3);
22 642 colspace = 5; out.colspace = colspace/ppos(3);
22 643 out.tokenwidth = h.itemTokenSize(1)/ppos(3);
644 % spaces between legend and axes
22 645 laxspace = 5; out.xlaxspace = laxspace/ppos(3); out.ylaxspace = laxspace/ppos(4);
22 646 out.strsizes = strsizes;
Other subfunctions in this file are not included in this listing.