Code of plot 1 exercise