Wrote and ran code for plot 4.