four plots and corresponding R code