plot 3 and 4 with both codes