#9744: implicit_plot fill option fills entire plot
-----------------------------------+----------------------------------------
Reporter: jason | Owner: jason, was
Type: defect | Status: needs_review
Priority: critical | Milestone: sage-5.0
Component: graphics | Keywords:
Work_issues: | Upstream: N/A
Reviewer: Karl-Dieter Crisman | Author: Jason Grout, Michael
Boratko, Benjamin Jones
Merged: | Dependencies:
-----------------------------------+----------------------------------------
Changes (by benjaminfjones):
* work_issues: fix lambda functions with fill =>
Old description:
> I was browsing the docs and noticed this example completely fills the
> plot black:
>
> {{{
> x,y = var('x,y')
> f(x,y) = x^2 + y^2 - 2
> implicit_plot(f, (-3, 3), (-3, 3),fill=True).show(aspect_ratio=1)
> }}}
>
> The docs say it should fill the region f(x)<0.
New description:
I was browsing the docs and noticed this example completely fills the plot
black:
{{{
x,y = var('x,y')
f(x,y) = x^2 + y^2 - 2
implicit_plot(f, (-3, 3), (-3, 3),fill=True).show(aspect_ratio=1)
}}}
The docs say it should fill the region f(x)<0.
----
Apply: [attachment:trac_9744_v2.patch]
--
Comment:
The following doctest that is currently in `region_plot` has the same
artefact:
{{{
region_plot(lambda x,y: x^2+y^2<1 or x<y, (x,-2,2), (y,-2,2))
}}}
I uploaded a new, new patch that only has the artefact when a python
function is passed
to implicit_plot in which case the user should increase the point count
appropriately. I
added a doctest to that effect as well.
With the patch applied, compare:
{{{
sage: x,y=var('x,y')
sage: implicit_plot(x^2+y^2-2, (x,-3,3), (y,-3,3), fill=True)
sage: g = lambda x,y: x^2+y^2-2
sage: implicit_plot(g, (x,-3,3), (y,-3,3), fill=True)
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9744#comment:11>
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.