replacing plot4.r with updated code
replacing plot4.R