8000 Merge pull request #1985 from mdboom/horizontal-histogram · matplotlib/matplotlib@b776730 · GitHub
[go: up one dir, main page]

Skip to content

Commit b776730

Browse files
committed
Merge pull request #1985 from mdboom/horizontal-histogram
horizontal histogramm doesn't work in 1.2 branch
2 parents 0c3768e + c124d75 commit b776730

File tree

5 files changed

+515
-503
lines changed

5 files changed

+515
-503
lines changed

lib/matplotlib/axes.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8165,8 +8165,10 @@ def hist(self, x, bins=10, range=None, normed=False, weights=None,
81658165

81668166
if orientation == 'horizontal':
81678167
_barfunc = self.barh
8168+
bottom_kwarg = 'left'
81688169
else: # orientation == 'vertical'
81698170
_barfunc = self.bar
8171+
bottom_kwarg = 'bottom'
81708172

81718173
for m, c in zip(n, color):
81728174
if bottom is None:
@@ -8176,8 +8178,8 @@ def hist(self, x, bins=10, range=None, normed=False, weights=None,
81768178
else :
81778179
height = m
81788180
patch = _barfunc(bins[:-1]+boffset, height, width,
8179-
align='center', log=log,
8180-
color=c, bottom=bottom)
8181+
align='center', log=log,
8182+
color=c, **{bottom_kwarg: bottom})
81818183
patches.append(patch)
81828184
if stacked:
81838185
bottom[:] = m
Binary file not shown.
Loading

0 commit comments

Comments
 (0)
0