Script used to plot the graphs: