How to do domain colouring in python with the relevent scales?

Viewed 14
import numpy as np

import matplotlib.pyplot as plt

f = lambda z : 1/(z+1)

xs,xe,rx, ys,ye,ry = -2,2,1000, -2,2,1000

x,y = np.ogrid[xs:xe:1j*rx, ys:ye:1j*ry]

plt.imshow(np.angle(f((x - 1j*y).T)), cmap="hsv")

plt.show()
0 Answers
Related