added plot3 and plot4 code and plots
refactored plot1 and plot2 source