small changes
Added savefig(), syncronised input parameters in code