Fixed graphics so legend fits in plot 3 and 4 updated code in R
fixed conflicts