Plot2.R and image

Plot2... ready
Convert the plotting to functions

I converted the plots to functions, since the last plot would require
from plot2 and plot3.