Corrected plot 4 code