Code for plot2 and plot2.png added