g=-2:0.01:2;
[xx yy] =meshgrid(g,g); zz = xx(:)+1i*yy(:);
ff = atan(zz);
figure; imagesc(g,g,real(reshape(ff,size(xx)))); caxis(3*[-1 1]); axis equal; title('Re tan^{-1} z')
figure; imagesc(g,g,imag(reshape(ff,size(xx)))); caxis(3*[-1 1]); axis equal; title('Im tan^{-1} z')
