function ReScale_plotyy_ButtonDownCallback(src,eventdata,ah)


Xdata = get(get(ah(1),'Children'),'XData');
XLimits = get(ah(1),'XLim');
idx = find ((Xdata > XLimits(1)) & Xdata < XLimits(2));

for i = 1:length(ah)
    Ydata = get(get(ah(i),'Children'),'YData');
    YMin = 1.05*min(Ydata(idx));
    YMax = 1.05*max(Ydata(idx));
    delta = YMax-YMin;
    set(ah(i),'YLim',[YMin YMax]);
    set(ah(i),'YTick',YMin:delta/8:YMax);
end

end

