this is the r-code for the plot1