Updated aggregate syntax to be cleaner
Converted plot to use ggplot2
Added code for plot 4