adding plot3.R code