Last change
on this file since 4 was
4,
checked in by zhangj, 10 years ago
|
Initial import--MML version from SOLEIL@2013
|
File size:
890 bytes
|
Line | |
---|
1 | function yaxesposition(PercentChange) |
---|
2 | %YAXESPOSITION - Vertical axes scaling for all the axes in a figure |
---|
3 | % |
---|
4 | % INPUTS |
---|
5 | % 1. PercentChange - Percentage for scaling (1 means no change) |
---|
6 | % |
---|
7 | % See also yaxesposition |
---|
8 | |
---|
9 | |
---|
10 | % |
---|
11 | % Written by Gregory J. Portmann |
---|
12 | |
---|
13 | |
---|
14 | h = get(gcf,'children'); |
---|
15 | |
---|
16 | % set(gcf, 'Units', get(0, 'Units')); |
---|
17 | % Pfig = get(gcf, 'Position'); |
---|
18 | % set(gcf, 'Position', get(0, 'ScreenSize')); |
---|
19 | |
---|
20 | |
---|
21 | for i = 1:length(h) |
---|
22 | hget = get(h(i)); |
---|
23 | if isfield(hget, 'Position') & ~strcmpi(hget.Tag, 'Legend') |
---|
24 | p = get(h(i), 'Position'); |
---|
25 | if PercentChange > 1 |
---|
26 | Percent = PercentChange - 1; |
---|
27 | set(h(i), 'Position', [p(1) p(2)-p(4)*Percent/2 p(3) p(4)+p(4)*Percent]); |
---|
28 | else |
---|
29 | Percent = 1 - PercentChange; |
---|
30 | set(h(i), 'Position', [p(1) p(2)+p(4)*Percent/2 p(3) p(4)-p(4)*Percent]); |
---|
31 | end |
---|
32 | end |
---|
33 | end |
---|
34 | |
---|
35 | %set(gcf,'Position', Pfig); |
---|
Note: See
TracBrowser
for help on using the repository browser.