fixing plot3.R