Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6be06d2 commit c817ae0Copy full SHA for c817ae0
1 file changed
lib/matplotlib/lines.py
@@ -459,7 +459,7 @@ def recache(self):
459
self._y = self._xy[:, 1] # just a view
460
461
self._subslice = False
462
- if len(x) > 100 and self._is_sorted(x):
+ if self.axes and len(x) > 100 and self._is_sorted(x):
463
self._subslice = True
464
if hasattr(self, '_path'):
465
interpolation_steps = self._path._interpolation_steps
@@ -496,7 +496,7 @@ def _is_sorted(self, x):
496
def draw(self, renderer):
497
if self._invalid:
498
self.recache()
499
- if self._subslice:
+ if self._subslice and self.axes:
500
# Need to handle monotonically decreasing case also...
501
x0, x1 = self.axes.get_xbound()
502
i0, = self._x.searchsorted([x0], 'left')
0 commit comments