Adding plots and corresponding R code