edited ch2 to include matplotlib inline and explicitly define plt