Skip to content

Commit af9c4d7

Browse files
committed
Don't pixel snap histogram step lines. It makes them not align properly with smoothed curves. Closes #408.
1 parent d664879 commit af9c4d7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/matplotlib/axes.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7792,6 +7792,8 @@ def hist(x, bins=10, range=None, normed=False, weights=None,
77927792
p.update(kwargs)
77937793
if lbl is not None: p.set_label(lbl)
77947794

7795+
p.set_snap(False)
7796+
77957797
for p in patch[1:]:
77967798
p.update(kwargs)
77977799
p.set_label('_nolegend_')

0 commit comments

Comments
 (0)