Fixed plot3, added all plot code for plot4