Add 4th code and plot
Revise using 'with' function