corrections to plot4 code and plot image