8000 FIX: Make sure the macosx backend updates the canvas when shown · matplotlib/matplotlib@23162ec · GitHub
[go: up one dir, main page]

Skip to content

Commit 23162ec

Browse files
committed
FIX: Make sure the macosx backend updates the canvas when shown
Force a draw_idle() call on the macosx backend when a show() is called to update the canvas.
1 parent e794f27 commit 23162ec

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/matplotlib/backends/backend_macosx.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ def __init__(self, canvas, num):
9393
self.show()
9494
self.canvas.draw_idle()
9595

96+
def show(self):
97+
# docstring inherited
98+
if self.canvas.figure.stale:
99+
self.canvas.draw_idle()
100+
super().show()
101+
96102
def close(self):
97103
Gcf.destroy(self)
98104

0 commit comments

Comments
 (0)
0