code for producing 2 plots in thesis