8000 Merge pull request #12516 from anntzer/hist · matplotlib/matplotlib@9acd9fe · GitHub
[go: up one dir, main page]

Skip to content

Commit 9acd9fe

Browse files
authored
Merge pull request #12516 from anntzer/hist
Don't handle impossible values for `align` in hist()
2 parents 2524624 + 82ff081 commit 9acd9fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6626,7 +6626,7 @@ def hist(self, x, bins=None, range=None, density=None, weights=None,
66266626
width = dr * totwidth
66276627
boffset, dw = 0.0, 0.0
66286628

6629-
if align == 'mid' or align == 'edge':
6629+
if align == 'mid':
66306630
boffset += 0.5 * totwidth
66316631
elif align == 'right':
66326632
boffset += totwidth
@@ -6695,7 +6695,7 @@ def hist(self, x, bins=None, range=None, density=None, weights=None,
66956695
else:
66966696
minimum = 0
66976697

6698-
if align == 'left' or align == 'center':
6698+
if align == 'left':
66996699
x -= 0.5*(bins[1]-bins[0])
67006700
elif align == 'right':
67016701
x += 0.5*(bins[1]-bins[0])

0 commit comments

Comments
 (0)
0