use %matplotlib inline instead of %pylab