Plot2 R Code revised

Revised code for plot 2