add Plot4.R
formatting and minor changes