Code for obtaining plot6 added