axis>LocSetEqual (Calls: 1, Time: 0.015 s)
Generated 18-May-2021 16:05:24 using performance time.
subfunction in file /usr/local/MATLAB/R2021a/toolbox/matlab/graph2d/axis.m
Copy to new window for comparing multiple runs
| Function Name | Function Type | Calls |
| axis | function | 1 |
| Line Number | Code | Calls | Total Time | % Time | Time Plot |
| 423 | a = getpixelposition(ax); | 1 | 0.007 s | 49.3% | |
| 429 | dz = diff(get(ax,'ZLim')); | 1 | 0.003 s | 22.0% | |
| 432 | pbar = get(ax,'PlotBoxAspectRa... | 1 | 0.002 s | 15.7% | |
| 418 | if all(rem(get(ax,'view'),90)~... | 1 | 0.001 s | 6.3% | |
| 434 | [a(3) a(4) dz*min(a(3),a(4))/m... | 1 | 0.000 s | 1.3% | |
| All other lines | 0.001 s | 5.5% | |||
| Totals | 0.015 s | 100% |
| Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
| getpixelposition | function | 1 | 0.004 s | 28.5% | |
| ...nteractions.createDefaultInteractions | class method | 2 | 0.001 s | 5.6% | |
| ...t;ControlManager.sendPVPairsToControl | class method | 2 | 0.000 s | 1.2% | |
| Self time (built-ins, overhead, etc.) | 0.010 s | 64.8% | |||
| Totals | 0.015 s | 100% |
| Total lines in function | 29 |
| Non-code lines (comments, blank lines) | 8 |
| Code lines (lines that can run) | 21 |
| Code lines that did run | 18 |
| Code lines that did not run | 3 |
| Coverage (did run/can run) | 85.71 % |
time | Calls | line | |
|---|---|---|---|
414 | function LocSetEqual(ax,pbarlimit) | ||
415 | %called in response to axis equal | ||
416 | |||
417 | % Check for 3-D plot. If so, use AXIS IMAGE. | ||
< 0.001 | 1 | 418 | if all(rem(get(ax,'view'),90)~=0) |
419 | LocSetImage(ax,pbarlimit); | ||
420 | return | ||
< 0.001 | 1 | 421 | end |
422 | |||
0.007 | 1 | 423 | a = getpixelposition(ax); |
< 0.001 | 1 | 424 | set(ax,'DataAspectRatio',[1 1 1]); |
< 0.001 | 1 | 425 | dx = diff(get(ax,'xlim')); |
< 0.001 | 1 | 426 | dy = diff(get(ax,'ylim')); |
< 0.001 | 1 | 427 | dz = 1; |
< 0.001 | 1 | 428 | if hasZProperties(handle(ax)) |
0.003 | 1 | 429 | dz = diff(get(ax,'ZLim')); |
< 0.001 | 1 | 430 | end |
< 0.001 | 1 | 431 | set(ax,'PlotBoxAspectRatioMode','auto') |
0.002 | 1 | 432 | pbar = get(ax,'PlotBoxAspectRatio'); |
< 0.001 | 1 | 433 | set(ax,'PlotBoxAspectRatio', ... |
1 | 434 | [a(3) a(4) dz*min(a(3),a(4))/min(dx,dy)]); | |
435 | |||
436 | % Change the unconstrained axis limit to auto based | ||
437 | % on the PBAR. | ||
< 0.001 | 1 | 438 | if pbar(1)/a(3) < pbar(2)/a(4) |
439 | set(ax,'xlimmode','auto') | ||
< 0.001 | 1 | 440 | else |
< 0.001 | 1 | 441 | set(ax,'ylimmode','auto') |
< 0.001 | 1 | 442 | end |
Other subfunctions in this file are not included in this listing.