generating plots for exercise 1