diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 937673b39f13..d6241aae817a 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -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 @@ -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])