8000 Merge pull request #19303 from chbauman/patch-1 · matplotlib/matplotlib@e341b26 · GitHub
[go: up one dir, main page]

Skip to content

Commit e341b26

Browse files
authored
Merge pull request #19303 from chbauman/patch-1
Extended the convolution filter for correct dilation
2 parents 07d4530 + df0cde3 commit e341b26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/event_handling/resample.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def downsample(self, xstart, xend):
2525
mask = (self.origXData > xstart) & (self.origXData < xend)
2626
# dilate the mask by one to catch the points just outside
2727
# of the view range to not truncate the line
28-
mask = np.convolve([1, 1], mask, mode='same').astype(bool)
28+
mask = np.convolve([1, 1, 1], mask, mode='same').astype(bool)
2929
# sort out how many points to drop
3030
ratio = max(np.sum(mask) // self.max_points, 1)
3131

0 commit comments

Comments
 (0)
0