R code for plot files and the generated png files