completed plot3 script. Minor clean up to plot1 and plot2