created the plots and saved the code