moved png files from figure directory to root direcotry, refactor code for plot1.R, plot2.R, plot3.R, plot4.R