The code above draw a fig in range x[-2,2] and y[-2,2], I change it to  x[-1, 1] and y[-2,2] by
editing the draw() like this:
X =  np.arange(-1,1,2/100.0) 
Y = copy.deepcopy(rg)#np.arange(-5, 5, 5/100.0)

May this help you.