ggplot version of lecture 9