code for plot2 and png file with plot2