8000 Don't handle impossible values for `align` in hist() by anntzer · Pull Request #12516 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Don't handle impossible values for align in hist() #12516

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 1 commit into from
Oct 13, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -6626,7 +6626,7 @@ def hist(self, x, bins=None, range=None, density=None, weights=None,
width = dr * totwidth
boffset, dw = 0.0, 0.0

if align == 'mid' or align == 'edge':
if align == 'mid':
boffset += 0.5 * totwidth
elif align == 'right':
boffset += totwidth
Expand Down Expand Up @@ -6695,7 +6695,7 @@ def hist(self, x, bins=None, range=None, density=None, weights=None,
else:
minimum = 0

if align == 'left' or align == 'center':
if align == 'left':
x -= 0.5*(bins[1]-bins[0])
elif align == 'right':
x += 0.5*(bins[1]-bins[0])
Expand Down
0