#13559: loglog plots of "large" function fail to find good evaluation points
------------------------+---------------------------------------------------
   Reporter:  nthiery   |             Owner:  jason, was
       Type:  defect    |            Status:  new       
   Priority:  major     |         Milestone:  sage-5.5  
  Component:  graphics  |          Keywords:            
Work issues:            |   Report Upstream:  N/A       
  Reviewers:            |           Authors:            
  Merged in:            |      Dependencies:            
   Stopgaps:            |  
------------------------+---------------------------------------------------
 It sounds like the adaptative algorithm fails to find suitable
 evaluation points when plotting large functions (like exp) in loglog
 scale. In the following example, the exp function gets drawn with only
 three points:
 {{{
 sage: plot([n^2,exp(n)], xmin=1, xmax=10^5, ymin=1,ymax=10^10,
 scale="loglog")
 verbose 0 (2397: plot.py, generate_plot_points) WARNING: When plotting,
 failed to evaluate function at 198 points.
 verbose 0 (2397: plot.py, generate_plot_points) Last error message: ''
 }}}

 If xmax is replaced by 10^10, the function is not even drawn:
 {{{
 sage: sage: plot([n^2,exp(n)], xmin=1, xmax=10^10, ymin=1,ymax=10^10,
 scale="loglog")
 verbose 0 (2397: plot.py, generate_plot_points) WARNING: When plotting,
 failed to evaluate function at 199 points.
 verbose 0 (2397: plot.py, generate_plot_points) Last error message: ''
 }}}

 On the other hand, the equivalent semilogy plot works smoothly:
 {{{
 sage: plot([10^n,exp(10^n)], xmin=0, xmax=5, ymin=1,ymax=10^10,
 scale="semilogy")
 verbose 0 (2397: plot.py, generate_plot_points) WARNING: When plotting,
 failed to evaluate function at 86 points.
 verbose 0 (2397: plot.py, generate_plot_points) Last error message: ''
 }}}

 (Such plots are typically useful in classes about algorithmic complexity
 http://combinat.sagemath.org/doc/thematic_tutorials/agregation-option-
 calcul-formel/tris_et_complexite.html)

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13559>
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.

Reply via email to