Skip to content

Commit

Permalink
Merge pull request #1985 from mdboom/horizontal-histogram
Browse files Browse the repository at this point in the history
horizontal histogramm doesn't work in 1.2 branch
  • Loading branch information
mdboom committed May 8, 2013
2 parents 0c3768e + c124d75 commit b776730
Show file tree
Hide file tree
Showing 5 changed files with 515 additions and 503 deletions.
6 changes: 4 additions & 2 deletions lib/matplotlib/axes.py
Expand Up @@ -8165,8 +8165,10 @@ def hist(self, x, bins=10, range=None, normed=False, weights=None,

if orientation == 'horizontal':
_barfunc = self.barh
bottom_kwarg = 'left'
else: # orientation == 'vertical'
_barfunc = self.bar
bottom_kwarg = 'bottom'

for m, c in zip(n, color):
if bottom is None:
Expand All @@ -8176,8 +8178,8 @@ def hist(self, x, bins=10, range=None, normed=False, weights=None,
else :
height = m
patch = _barfunc(bins[:-1]+boffset, height, width,
align='center', log=log,
color=c, bottom=bottom)
align='center', log=log,
color=c, **{bottom_kwarg: bottom})
patches.append(patch)
if stacked:
bottom[:] = m
Expand Down
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/hist_steplog.pdf
Binary file not shown.
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/hist_steplog.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b776730

Please sign in to comment.