Ticket #11208 (closed defect: fixed)
Remove numpy warnings in slope field
|Reported by:||kcrisman||Owned by:||jason, was|
|Cc:||jason, novoselt||Work issues:|
|Report Upstream:||Reported upstream. Little or no feedback.||Reviewers:||David Loeffler, Karl-Dieter Crisman|
|Authors:||Douglas McNeil||Merged in:||sage-5.0.beta9|
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 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.
- Cc jason added
- Report Upstream changed from N/A to Not yet reported upstream; Will do shortly.
- Milestone set to sage-4.7
- Status changed from needs_review to needs_work
- Reviewers set to PatchBot
- Dependencies set to #10489
- Report Upstream changed from Not yet reported upstream; Will do shortly. to Reported upstream. Little or no feedback.
- Reviewers changed from PatchBot to David Loeffler, Karl-Dieter Crisman
- Authors set to Douglas McNeil
comment:11 Changed 14 months ago by kcrisman
- Priority changed from minor to major
- Status changed from needs_review to positive_review
comment:13 Changed 14 months ago by jdemeyer
- Status changed from positive_review to closed
- Resolution set to fixed
- Merged in set to sage-5.0.beta9