Code and image for third plot