ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 04 Sep 2013 07:13:04 -05003dplot of modulus of complex functionhttp://ask.sagemath.org/question/10502/3dplot-of-modulus-of-complex-function/Even though abs(x+I*y) should always be real... I get the following error:
plot3d(abs(x+I*y),(x,-5,5),(y,-5,5))
ERROR: unable to coerce to a real numberWed, 04 Sep 2013 06:55:44 -0500http://ask.sagemath.org/question/10502/3dplot-of-modulus-of-complex-function/Answer by tmonteil for <p>Even though abs(x+I*y) should always be real... I get the following error: </p>
<p>plot3d(abs(x+I*y),(x,-5,5),(y,-5,5))
ERROR: unable to coerce to a real number</p>
http://ask.sagemath.org/question/10502/3dplot-of-modulus-of-complex-function/?answer=15413#post-id-15413This is may not be a good answer explaining why is the `Symbolic Ring` not working here, but at least a workaround: forget about symbolic functions and use Python lambda functions instead:
sage: plot3d(lambda x,y: abs(x+I*y), (x,-5,5), (y,-5,5))
or even:
sage: plot3d(lambda x,y: abs(x+I*y), (x,-5,5), (y,-5,5), adaptive=True)
Wed, 04 Sep 2013 07:13:04 -0500http://ask.sagemath.org/question/10502/3dplot-of-modulus-of-complex-function/?answer=15413#post-id-15413