Create plot4.R

Code for plot4 of assignment 1