#12277: Warnings in `plot_slope_field`
------------------------+---------------------------------------------------
   Reporter:  novoselt  |          Owner:  jason, was                    
       Type:  defect    |         Status:  needs_review                  
   Priority:  major     |      Milestone:  sage-duplicate/invalid/wontfix
  Component:  graphics  |       Keywords:                                
Work_issues:            |       Upstream:  N/A                           
   Reviewer:            |         Author:                                
     Merged:            |   Dependencies:                                
------------------------+---------------------------------------------------
Changes (by novoselt):

  * status:  new => needs_review
  * milestone:  sage-5.0 => sage-duplicate/invalid/wontfix


Old description:

> If I do (in Sage 4.7.2 or 4.8.alpha6)
> {{{
> plot_slope_field(1, (1,2), (3,4))
> }}}
> (or anything else that I have tried), then in front of the plot, which
> looks as expected, I get
> {{{
> Warning: divide by zero encountered in divide
> Warning: invalid value encountered in multiply
> Warning: invalid value encountered in multiply
> Warning: divide by zero encountered in divide
> Warning: invalid value encountered in multiply
> Warning: invalid value encountered in multiply
> }}}
>
> My investigation so far shows: this function is a little wrapper for
> `plot_vector_field` which sets new defaults for three options. If
> `headlength` is set to 0, there are warnings.
>
> A possible workaround is to set it to something small: 0.001 seems to
> work on the screen. However, since with `headaxislength=0` and
> `headlength=0.2` I definitely see "a hair on the end", it does not seem
> to be satisfactory from a perfectionist point of view (and producing
> vector formats that may be scaled or printed with high resolution).
>
> Besides, current settings do produce the accurate plot, it just shows
> warnings that should not be there, and I have no idea how to fix it.

New description:

 Duplicate of #11208

 If I do (in Sage 4.7.2 or 4.8.alpha6)
 {{{
 plot_slope_field(1, (1,2), (3,4))
 }}}
 (or anything else that I have tried), then in front of the plot, which
 looks as expected, I get
 {{{
 Warning: divide by zero encountered in divide
 Warning: invalid value encountered in multiply
 Warning: invalid value encountered in multiply
 Warning: divide by zero encountered in divide
 Warning: invalid value encountered in multiply
 Warning: invalid value encountered in multiply
 }}}

 My investigation so far shows: this function is a little wrapper for
 `plot_vector_field` which sets new defaults for three options. If
 `headlength` is set to 0, there are warnings.

 A possible workaround is to set it to something small: 0.001 seems to work
 on the screen. However, since with `headaxislength=0` and `headlength=0.2`
 I definitely see "a hair on the end", it does not seem to be satisfactory
 from a perfectionist point of view (and producing vector formats that may
 be scaled or printed with high resolution).

 Besides, current settings do produce the accurate plot, it just shows
 warnings that should not be there, and I have no idea how to fix it.

--

Comment:

 Yes, strange I couldn't find it, I tried to search... My current
 workaround is that I have redefined `plot_slope_field`. It is in a way
 good, since I also had to fix aspect ratio (for 4.7.2) and changed
 defaults for colour and frame to match the textbook I am using.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12277#comment:5>
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