R code for first plot and the png file of plot1