Adding the R code and PNGs for all the four plots