added code and images for plot3 and plot4