generate pylab plot