function []=saveFigure(fig,filename)

    set(fig,'Position',[251 49 1105 636]);
    axes = findobj(fig,'type','axes');
    set(axes,'FontSize',12);
    set(fig,'PaperPositionMode','auto');
    print(fig,'-dpng','-zbuffer','-r300',filename)
    disp(strcat('file saved at ',filename))
end