plot 3 R-script

changes to plot script for plot 3