import matplotlib instead of pylab