Code and images for plots 1 and 2