#9744: implicit_plot fill option fills entire plot
---------------------------------------------------+------------------------
Reporter: jason | Owner: jason,
was
Type: defect | Status:
needs_work
Priority: critical | Milestone: sage-5.0
Component: graphics | Keywords:
Work_issues: fix lambda functions with fill | Upstream: N/A
Reviewer: Benjamin Jones, Karl-Dieter Crisman | Author: Jason
Grout, Michael Boratko
Merged: | Dependencies:
---------------------------------------------------+------------------------
Changes (by kcrisman):
* priority: major => critical
* reviewer: Benjamin Jones => Benjamin Jones, Karl-Dieter Crisman
* status: needs_review => needs_work
* work_issues: => fix lambda functions with fill
Comment:
BFJ, I assume this means positive review apart from this error?
Huh, yeah, this definitely means 'needs work'. Even though the
functionality didn't work at all before, lambdas shouldn't break too many
things, and this is a very natural change to make. The problem is in
`equify` (see the [http://hg.sagemath.org/sage-
main/file/c239be1054e0/sage/plot/contour_plot.py#l748 very bottom of the
file].
{{{
sage: c = polygen(CDF,'c')
sage: z = 0
sage: for i in range(1):
z = z*z + c
....:
sage: def g(x,y):
val = z(CDF(x, y))
return val.norm() - 4
....:
sage: implicit_plot(g,(-3,3),(-3,3)) # looks fine, no surprise
sage: sage.plot.contour_plot.equify(g) # no problem, so plotting should
work with fill
<function <lambda> at 0x10df9d578>
sage: implicit_plot(g,(-3,3),(-3,3),fill=True) # error above
}}}
Got it. The problem is
{{{
f<0
}}}
in `region_plot`. In the case I just did,
{{{
sage: g<0
True
}}}
so we are now plotting `True` instead of `g`, which of course makes the
error message quite understandable.
I tried a few things to see if I could fix it in a few minutes, but I
think the "right" answer might be more complicated.
Unless we think we ''should'' just fix this and put in a warning about
lambdas being broken? Seems poor form.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9744#comment:8>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.