Added plot2.R and plot2.png, modified plot1.R code to access and close device