Added codes to plot the graphs