R script that generates plot3.png