R script for plotting the first plot.