Update plot3.R

Corrected the R code to use png() instead of dev.copy()