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 12ae18f

Browse filesBrowse files
committed
Always remake the subsliced line. Fix #5270
Before, the subsliced line will only be made if it's sufficiently smaller than before. However, when zooming out after zooming in, it may actually be *larger* than before. Rather than tracking which is occurring, it's best to just always remake -- it doesn't seem to be an important optimization anyway.
1 parent d028f87 commit 12ae18f
Copy full SHA for 12ae18f

File tree

Expand file treeCollapse file tree

1 file changed

+2
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-4
lines changed

‎lib/matplotlib/lines.py

Copy file name to clipboardExpand all lines: lib/matplotlib/lines.py
+2-4Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -717,10 +717,8 @@ def draw(self, renderer):
717717
i0, = self._x_filled.searchsorted([x0], 'left')
718718
i1, = self._x_filled.searchsorted([x1], 'right')
719719
subslice = slice(max(i0 - 1, 0), i1 + 1)
720-
# Don't remake the Path unless it will be sufficiently smaller.
721-
if subslice.start > 100 or len(self._x) - subslice.stop > 100:
722-
self.ind_offset = subslice.start
723-
self._transform_path(subslice)
720+
self.ind_offset = subslice.start
721+
self._transform_path(subslice)
724722

725723
transf_path = self._get_transformed_path()
726724

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.