Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix #5007 #5008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 31, 2015
Merged

fix #5007 #5008

merged 3 commits into from
Aug 31, 2015

Conversation

sdementen
Copy link
Contributor

I have fixed the issue and tested interactively. However, I do not know how to add a test that failed before the fix and succeed after the fix ...

@tacaswell
Copy link
Member

@sdementen The last thing you need to do was to open the pull request. I have done this for you, but in the future see https://help.github.com/articles/creating-a-pull-request/ for how to use the gh interface to do this.

if abs(x - lastx) < 5 or abs(y - lasty) < 5:
# allows the user to "cancel" a zoom action
# by zooming by less than 5 pixels
if (abs(x - lastx) < 5 and self._zoom_mode!="y") \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use () for line continuation not \.

@tacaswell
Copy link
Member

You can just keep pushing commits to this branch on gh and the PR will automatically update to reflect them (the code this page is bound to is the branch name on your gh repo, not the commit currently at the tip).

@sdementen
Copy link
Contributor Author

Ok, I have fixed the style issue

# allows the user to "cancel" a zoom action
# by zooming by less than 5 pixels
if ((abs(x - lastx) < 5 and self._zoom_mode!="y") or
(abs(y - lasty) < 5 and self._zoom_mode!="x")):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put an extra 4 spaces on this line? This is one of those cases where I am pretty sure the pep8 guidelines are contradictory. The over-indent is less bad than aligning with the body.

WeatherGod added a commit that referenced this pull request Aug 31, 2015
@WeatherGod WeatherGod merged commit ca0427b into matplotlib:master Aug 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants