remove pylab references
Python 2 compat