ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 17 Aug 2017 17:36:31 -0500Implicit plot with squaring and absolute value produces empty plothttp://ask.sagemath.org/question/38563/implicit-plot-with-squaring-and-absolute-value-produces-empty-plot/ The following code:
sage: x,y = var('x y')
sage: implicit_plot(x, (x,-2,2), (y,-2,2))
produces a plot of a straight line along the coordinate y-axis as expected (it should plot the curve $x = 0$).
However, this very similar code:
sage: implicit_plot(x^2, (x,-2,2), (y,-2,2))
produces a plot with nothing on it, even though it *should* plot the curve $x^2 = 0$ which is clearly the same as the above curve.
This problem seems to persist with any function $f(x, y)$, i.e., in the following code,
f(x, y) = [some expression involving x and y]
sage: implicit_plot(f(x, y), [x scale], [y scale])
sage: implicit_plot(f(x, y)^2, [x scale], [y scale])
the second line produces a nonempty plot while the third line produces an empty plot. Replacing `f(x,y)^2` with `abs(f(x,y))` or even `abs_symbolic(f(x,y))` has the same effect: they all produce empty plots.
The problem persists when one replaces `implicit_plot` with `implicit_plot3d`.
What's going on? Is this a bug?DoekeThu, 17 Aug 2017 17:36:31 -0500http://ask.sagemath.org/question/38563/