Add improved plot 1 code