I am trying to write a scroll bar that changes the x-range of many subplots at the same time.
kids = get(gcf,'Children');
h=uicontrol('style','slider',...
'units','normalized','position',Newpos,...
'callback',{@slide_axes,kids},'min',0,'max',xmax-chunkDuration);
Update_axes is defined in the same file:
function slide_axes(h)
set(h,'xlim',get(gcbo,'value')+[0 20000]);
end
However, I get the error:
??? Error using plot_scroll>slide_axes
Too many input arguments.
??? Error while evaluating uicontrol Callback
I read on the FEX that callback may pass two arguments to any callback function. However, when I changed the signature of slide_axes
to slide_axes(h,evt)
the error remains.