import matplotlib.pyplot as plt
import numpy as np
import mpmath as mp
#mandelbrotmenge
def zn(z,c,n):
if(np.sqrt(np.real(z)*np.real(z)+np.imag(z)*np.imag(z)) >= 2):
return complex(1,n)
if(n==100):
return 0
return zn(z*z+c,c,n+1)
fun = lambda x: zn(0,x,1)
mp.cplot(fun, re=[-1.6, 0.6], im=[-1.3, 1.3], points=599999, color=None, verbose=False, file=’/Users/saveit.png‘, dpi=2000, axes=None)