10000 Fix missing endline on step histogram · matplotlib/matplotlib@e361a53 · GitHub
[go: up one dir, main page]

Skip to content

Commit e361a53

Browse files
committed
Fix missing endline on step histogram
1 parent 8d468f9 commit e361a53

File tree

5 files changed

+575
-3
lines changed

5 files changed

+575
-3
lines changed

lib/matplotlib/axes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8455,11 +8455,11 @@ def hist(self, x, bins=10, range=None, normed=False, weights=None,
84558455
xvals, yvals = [], []
84568456
for m in n:
84578457
# starting point for drawing polygon
8458-
y[0] = y[-1]
8458+
y[0] = y[1]
84598459
# top of the previous polygon becomes the bottom
84608460
y[2*len(bins)-1:] = y[1:2*len(bins)-1][::-1]
84618461
# set the top of this polygon
8462-
y[1:2*len(bins)-1:2], y[2:2*len(bins):2] = m, m
8462+
y[1:2*len(bins)-1:2], y[2:2*len(bins)-1:2] = m, m
84638463
if log:
84648464
y[y < minimum] = minimum
84658465
if orientation == 'horizontal':
@@ -8479,7 +8479,7 @@ def hist(self, x, bins=10, range=None, normed=False, weights=None,
84798479
facecolor=c))
84808480
else:
84818481
for x, y, c in reversed(zip(xvals, yvals, color)):
8482-
split = int(len(x) / 2) + 1
8482+
split = 2 * len(bins)
84838483
patches.append(self.fill(
84848484
x[:split], y[:split],
84858485
closed=False, edgecolor=c,
Binary file not shown.
Loading

0 commit comments

Comments
 (0)
0