'CloseRequestFcn',@cb_close);
'Style','pushbutton', ...
'Callback',@cb_print) ...
'Style','pushbutton', ...
'Style','pushbutton', ...
'Callback',@cb_previous) ...
'Style','pushbutton', ...
output_file_name = ['.' filesep() 'output'];
set(f,'SizeChangedFcn',@scf);
set(ax,'Position',[30 60 pos(3)-60 pos(4)-80]);
set(buttons(1),'Position',[pos(3)-290 4 60 22]);
set(buttons(2),'Position',[pos(3)-220 4 60 22]);
set(buttons(3),'Position',[pos(3)-150 4 60 22]);
set(buttons(4),'Position',[pos(3)-80 4 60 22]);
answer = questdlg('Are you sure?');
set(buttons,'Visible','off');
print(f,[output_file_name sprintf('_%03d',current_data_set) '.png'],'-r300','-dpng');
set(buttons,'Visible','on');
if current_data_set == n_data_set
current_data_set = current_data_set+1;
set(data_line,'XData',1:10,'YData',new_data);
set(ax,'XLim',[1 10],'YLim',[min(new_data) max(new_data)]);
function cb_previous(~,~)
current_data_set = current_data_set-1;
set(data_line,'XData',1:10,'YData',new_data);
set(ax,'XLim',[1 10],'YLim',[min(new_data) max(new_data)]);