function [handle, figname] = createStackPlot(plotnum)

figname = figure;
for i=1:plotnum,handle(i)=subplot(plotnum,1,i);end  % create the axes, save handles
p=cell2mat(get(handle,'position'));     % get the positions
ptop=p(1,2)+p(1,4);                 % and compute to fit, adjust...
htavg=(ptop-p(plotnum,2))/(plotnum);
p(:,4)=htavg;

for i=plotnum-1:-1:1,p(i,2)=p(i+1,2)+htavg;end
for i=1:plotnum,set(handle(i),'position',p(i,:)),end
for i=1:plotnum,set(handle(i),'box','on'),end