updates plot1 as function