We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7c4e9a1 commit 8699cc2Copy full SHA for 8699cc2
2 files changed
lib/matplotlib/backends/backend_macosx.py
@@ -43,7 +43,7 @@ def _draw(self):
43
44
def draw(self):
45
# docstring inherited
46
- self.draw_idle()
+ self._draw()
47
self.flush_events()
48
49
# draw_idle is provided by _macosx.FigureCanvas
lib/matplotlib/tests/test_backend_macosx.py
@@ -0,0 +1,20 @@
1
+import pytest
2
+
3
+import matplotlib.pyplot as plt
4
5
6
+pytest.importorskip("matplotlib.backends.backend_macosx",
7
+ reason="These are mac only tests")
8
9
10
+@pytest.mark.backend('macosx')
11
+def test_cached_renderer():
12
+ # Make sure that figures have an associated renderer after
13
+ # a fig.canvas.draw() call
14
+ fig = plt.figure(1)
15
+ fig.canvas.draw()
16
+ assert fig._cachedRenderer is not None
17
18
+ fig = plt.figure(2)
19
+ fig.draw_without_rendering()
20
0 commit comments