0001 function yaxesposition(PercentChange)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 h = get(gcf,'children');
0015
0016
0017
0018
0019
0020
0021 for i = 1:length(h)
0022 hget = get(h(i));
0023 if isfield(hget, 'Position') & ~strcmpi(hget.Tag, 'Legend')
0024 p = get(h(i), 'Position');
0025 if PercentChange > 1
0026 Percent = PercentChange - 1;
0027 set(h(i), 'Position', [p(1) p(2)-p(4)*Percent/2 p(3) p(4)+p(4)*Percent]);
0028 else
0029 Percent = 1 - PercentChange;
0030 set(h(i), 'Position', [p(1) p(2)+p(4)*Percent/2 p(3) p(4)-p(4)*Percent]);
0031 end
0032 end
0033 end
0034
0035