%matplotlib inline , add this line so ipython notebook shows the plot inline