#11208: Remove numpy warnings in slope field
------------------------+---------------------------------------------------
Reporter: kcrisman | Owner: jason, was
Type: defect | Status: new
Priority: minor | Milestone:
Component: graphics | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------+---------------------------------------------------
Having no arrows in an arrow plot (i.e., vector field that is a slope
field) now causes warnings from matplotlib.
{{{
y = var('y')
g = 1
P=plot_slope_field(g,(x,3,4),(y,-1,1))
P
<two sets of warnings>
}}}
DSM has a diagnosis at [http://groups.google.com/group/sage-
support/browse_thread/thread/49471ab062fcb8e9 this sage-support thread]
{{{
P=plot_slope_field(g,(x,3,4),(y,-1,1),headlength=1e-8)
works for me. FYI, it's the following few lines in Quiver._h_arrows at
fault:
minsh = self.minshaft * self.headlength
[....]
shrink = length/minsh
X0 = shrink * X0[np.newaxis,:]
Y0 = shrink * Y0[np.newaxis,:]
Probably we should change the defaults and/or (if it's not done
already) ask our matplotlib friends to special-case 0 for no
arrowheads.
}}}
So maybe this should be reported upstream? See also #2922, which is also
about the mpl quivers.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11208>
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.