R scripts and PNG for plots 1 - 4