modified plot1 and plot2