R code to produce Plot 3
The third plot in the assignment
The fourth plot in the assignment
R code to produce Plot 4