plots and code for assignment