R script that generates plot4.png