Plot and R Code for plot3