Avoid division by zero if headlength=0 for quiver #7525

Merged
merged 3 commits into from Nov 28, 2016

Conversation

Projects
None yet
5 participants
Contributor

rmjarvis commented Nov 28, 2016

I use quiver a lot with headless arrows to make whisker plots. But the code always outputs a division by zero warning, which I need to suppress. I don't think there is an open issue about this, but it was mentioned on list over four years ago.

Anyway, the fix is simple, so here it is.

rmjarvis added some commits Nov 28, 2016

@rmjarvis rmjarvis Avoid division by zero if headlength=0 for quiver
70fdd6e
@rmjarvis rmjarvis Switch from > to !=, since maybe valid for minsh to be negative here.
3e5aa3a
@rmjarvis rmjarvis Conform to pep8
cbc37fb

NelleV changed the title from Avoid division by zero if headlength=0 for quiver to [MRG+1] Avoid division by zero if headlength=0 for quiver Nov 28, 2016

@NelleV

NelleV approved these changes Nov 28, 2016

LGTM.
i don't know why appveyar is unhappy.

Contributor

rmjarvis commented Nov 28, 2016

i don't know why appveyar is unhappy.

It appears to have been unhappy for a while now, so I suspect it is something on master unrelated to this PR. AFAICT, the last commit on master that passed AppVeyor was on Nov 19, when #7481 was merged. I don't think there is anything afterward that passes AppVeyor.

@dopplershift

Looks good. Thanks!

@efiring efiring merged commit b9c3b64 into matplotlib:master Nov 28, 2016

2 of 3 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 61.886%
Details
Owner

efiring commented Nov 28, 2016

Thank you, @rmjarvis.

@efiring efiring added a commit that referenced this pull request Nov 28, 2016

@efiring efiring Merge pull request #7525 from rmjarvis/quiver-nohead
[MRG+1] Avoid division by zero if headlength=0 for quiver
ab65830
Owner

efiring commented Nov 28, 2016

backported to 2.x as ab65830.

QuLogic changed the title from [MRG+1] Avoid division by zero if headlength=0 for quiver to Avoid division by zero if headlength=0 for quiver Nov 28, 2016

rmjarvis deleted the unknown repository branch Nov 28, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment