added plot1 code and graph