#9744: implicit_plot fill option fills entire plot
------------------------------+---------------------------------------------
Reporter: jason | Owner: jason, was
Type: defect | Status: needs_review
Priority: major | Milestone: sage-4.8
Component: graphics | Keywords:
Work_issues: | Upstream: N/A
Reviewer: Benjamin Jones | Author: Jason Grout, Michael Boratko
Merged: | Dependencies:
------------------------------+---------------------------------------------
Changes (by benjaminfjones):
* reviewer: => Benjamin Jones
Comment:
I ran into this bug and thought I would review the patch here. The patch
applies cleanly to 4.8.alpha6 (I'm still waiting for 4.8.rc0 to build).
Doctests on `sage/plot/contour_plot.py` pass. More importantly, I went
through all the docstring examples for `implicit_plot` by hand in the
notebook to make sure they look correct, and they all do so that's great!
However, when I try the following (a modification of one of the doctests):
{{{
sage: def mandel(n):
... c = polygen(CDF, 'c')
... z = 0
... for i in range(n):
... z = z*z + c
... def f(x, y):
... val = z(CDF(x, y))
... return val.norm() - 4
... return f
sage: implicit_plot(mandel(1), (-3, 3), (-3, 3), fill=True)
}}}
I get an error:
{{{
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_21.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8
-*-\\n" +
_support_.preparse_worksheet_cell(base64.b64decode("aW1wbGljaXRfcGxvdChtYW5kZWwoMSksICgtMywgMyksICgtMywgMyksIGZpbGw9VHJ1ZSk="),globals())+"\\n");
execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/tmp/tmpp9xXZj/___code___.py", line 3, in <module>
exec compile(u'implicit_plot(mandel(_sage_const_1 ), (-_sage_const_3 ,
_sage_const_3 ), (-_sage_const_3 , _sage_const_3 ), fill=True)
File "", line 1, in <module>
File "/home/jonesbe/sage/sage-4.8.alpha6/local/lib/python2.6/site-
packages/sage/misc/decorators.py", line 534, in wrapper
return func(*args, **options)
File "/home/jonesbe/sage/sage-4.8.alpha6/local/lib/python2.6/site-
packages/sage/plot/contour_plot.py", line 609, in implicit_plot
return region_plot(f<0, xrange, yrange, borderwidth=linewidths,
borderstyle=linestyles, **options)
File "/home/jonesbe/sage/sage-4.8.alpha6/local/lib/python2.6/site-
packages/sage/misc/decorators.py", line 534, in wrapper
return func(*args, **options)
File "/home/jonesbe/sage/sage-4.8.alpha6/local/lib/python2.6/site-
packages/sage/plot/contour_plot.py", line 726, in region_plot
for func in g],dtype=float)
File "/home/jonesbe/sage/sage-4.8.alpha6/local/lib/python2.6/site-
packages/sage/plot/contour_plot.py", line 783, in <lambda>
return lambda x,y: -1 if f(x,y) else 1
TypeError: 'bool' object is not callable
}}}
Any idea what's going on here?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9744#comment:7>
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.