Code to generate plot1