r code for ggplot2 ch1