Scripts and figures for Plots 1-3