import numpy as np import matplotlib.pyplot as plt # a, b, c, d in C # ad - cb != 0 def moebius(z, a, b, c, d): return (a * z + b) / (c * z + d) a = 1 b = 2 c = 3 d = 4 x = np.linspace(-10, 10, 100) y = np.linspace(-10, 10, 100) X, Y = np.meshgrid(x, y) Z = X + 1j * Y W = moebius(Z, a, b, c, d) fig, ax = plt.subplots(subplot_kw={"projection": "3d"}) surf = ax.plot_surface(X, Y, W.real, cmap='inferno', linewidth=0) ax.view_init(20, 235) ax._axis3don = False plt.tight_layout() plt.show() plt.savefig('moebius1234.png' ,bbox_inches='tight', transparent=True, dpi=1080)