N = 70; D, x = cheb(N); x = x[1:N];
L = 6.0; x = L*x; D = D/L;
A = -dot(D,D);
A = A[1:N,1:N] + (1+3j)*diag(x**2);
lam, v = eig(A)
fig = figure()
plot(real(lam),imag(lam),"o")
axis([0, 50, 0, 40])
h = 0.5 # Smaller the value, finer the plot
x = arange(0,50+h,h); y = arange(0,40+h,h); xx,yy = meshgrid(x,y,indexing='ij');
zz = xx + 1j*yy;
I = eye(N-1); sigmin = zeros((len(x),len(y)))
for i in range(0,len(x)):
for j in range(0,len(y)):
sigmin[i,j] = min(svdvals(zz[i,j]*I - A));
levels = 10.0**arange(-4.5,0.0,0.5);
contour(xx,yy,sigmin,levels,colors = 'k');