Create plot2.R

This is the R code to create the plot2.