Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e361a53

Browse filesBrowse files
committed
Fix missing endline on step histogram
1 parent 8d468f9 commit e361a53
Copy full SHA for e361a53

File tree

5 files changed

+575
-3
lines changed
Filter options

5 files changed

+575
-3
lines changed

‎lib/matplotlib/axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes.py
+3-3Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.