|
6 | 6 | """The BlitManager used to handle drawing and caching of backgrounds.""" |
7 | 7 |
|
8 | 8 | import logging |
| 9 | +from contextlib import ExitStack, contextmanager |
| 10 | +from functools import lru_cache |
9 | 11 | from itertools import chain |
10 | | -from contextlib import contextmanager, ExitStack |
11 | 12 | from weakref import WeakSet |
12 | | -from functools import lru_cache |
13 | 13 |
|
14 | | -import numpy as np |
15 | 14 | import matplotlib.pyplot as plt |
16 | | -from matplotlib.transforms import Bbox |
| 15 | +import numpy as np |
17 | 16 | from matplotlib.spines import Spine |
| 17 | +from matplotlib.transforms import Bbox |
18 | 18 |
|
19 | 19 | _log = logging.getLogger(__name__) |
20 | 20 |
|
@@ -840,7 +840,6 @@ def _on_draw_cb(self, event): |
840 | 840 | loglevel = _log.getEffectiveLevel() |
841 | 841 |
|
842 | 842 | if hasattr(cv, "get_renderer") and not cv.is_saving(): |
843 | | - |
844 | 843 | renderer = cv.get_renderer() |
845 | 844 | if renderer is None: |
846 | 845 | # don't run if no renderer is available |
@@ -886,7 +885,7 @@ def _on_draw_cb(self, event): |
886 | 885 |
|
887 | 886 | # workaround for nbagg backend to avoid glitches |
888 | 887 | # it's slow but at least it works... |
889 | | - # check progress of the following issuse |
| 888 | + # check progress of the following issues |
890 | 889 | # https://github.com/matplotlib/matplotlib/issues/19116 |
891 | 890 | if self._mpl_backend_blit_fix: |
892 | 891 | self.update() |
@@ -1368,7 +1367,7 @@ def update( |
1368 | 1367 | if blit: |
1369 | 1368 | # workaround for nbagg backend to avoid glitches |
1370 | 1369 | # it's slow but at least it works... |
1371 | | - # check progress of the following issuse |
| 1370 | + # check progress of the following issues |
1372 | 1371 | # https://github.com/matplotlib/matplotlib/issues/19116 |
1373 | 1372 | if self._mpl_backend_force_full: |
1374 | 1373 | cv._force_full = True |
@@ -1549,7 +1548,6 @@ def _cleanup_bg_layers(self, layer): |
1549 | 1548 | ) |
1550 | 1549 |
|
1551 | 1550 | def _cleanup_on_layer_activation(self, layer): |
1552 | | - |
1553 | 1551 | try: |
1554 | 1552 | # remove not yet executed lazy-activation methods |
1555 | 1553 | # (e.g. not yet fetched WMS services) |
|
0 commit comments