added script and figure for plot6