Create plot2.R

Code for plot2 of assignment 1