Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 06bc628

Browse files
committed
Fixed a bug in hist with stepfilled and log=True
svn path=/trunk/matplotlib/; revision=8097
1 parent e620bf1 commit 06bc628

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
2010-01-25 Fixed a bug reported by Olle Engdegard, when using
2+
histograms with stepfilled and log=True - MM
13

24
2010-01-16 Upgraded CXX to 6.1.1 - JDH
35

lib/matplotlib/axes.py

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

72177217
for m in n:
72187218
y[1:-1:2], y[2::2] = m, m
7219+
if log:
7220+
y[y<1e-100]=1e-100
72197221
if orientation == 'horizontal':
72207222
x,y = y,x
72217223
elif orientation != 'vertical':

0 commit comments

Comments
 (0)