Rcode to create plot files & output png files