Ask Your Question

Revision history [back]

One way to fix this is to replace abs(x+I*y) with sqrt(x^2+y^2).

Sage plotting routines use native Python type float under the hood for domain variables, while input functions are of the symbolic Sage type Expression. The two don't always mix well for plotting, especially when complex variables are involved.

Another way around the problem is to put lambda x,y: in front of the function containing the complex unit to force evaluation as a Python callable.