Added plot1 codes and plot.