#5145: increase default plot_points value for contour_plot
---------------------+------------------------------------------------------
Reporter: was | Owner: tbd
Type: defect | Status: new
Priority: major | Milestone: sage-3.3
Component: algebra | Keywords:
---------------------+------------------------------------------------------
Motivation: Somewhat regularly on sage-support we get emails like this:
{{{
Hi everyone,
I run into a very strange problem, that looks like critical to me.
Basically, I plot two functions that I know must be tangent at a given
point, and they are not.
First, the code:
x,y=var('x,y')
utility=y*x^2
budget = 24-x
cp=contour_plot(utility,(x,0,24),(y,
0,24),fill=False,cmap='cool',contours=(100,1000,2048,2700,3500))
bp=plot(budget,(x,0,24),color='red')
cp+bp
Now, the plot that comes after calling 'cp+bp' must have the following
property: the straight red line must be tangent to the contour of the
utility function evaluated at level utility=2048; and they must be
tangent at the point (16,8). In my system (Sage 3.2.3 on OpenSuse11.1)
they are NOT tangent; in fact, the sage plot indicates tangency at a
lower level, ~1820.
...
- Or else is it a calculation problem on the part of sage? I'd find
this absolutely strange. And critical: I want to trust Sage to do the
calculations correctly.
Can you reproduce it?
Thanks,
}}}
But putting plot_points=200 fixes things. Right now the default is a
mere 25, which seems absurdly small. I think we should change the
default plot_points parameter. It was very low, I think, because
evaluation of symbolic expressions used to be slow -- now it's extremely
fast -- so we should increase the default number of points to at least
200.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5145>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---