From 52d8bcbe2439a8265700985cf8b105c13a040ff7 Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Wed, 20 Mar 2024 17:58:02 -0500 Subject: [PATCH] Add a draw during show for macos backend Without this a stale figure is shown --- lib/matplotlib/backends/backend_macosx.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/matplotlib/backends/backend_macosx.py b/lib/matplotlib/backends/backend_macosx.py index 7f5589677d31..adb5b5691b23 100644 --- a/lib/matplotlib/backends/backend_macosx.py +++ b/lib/matplotlib/backends/backend_macosx.py @@ -179,6 +179,8 @@ def start_main_loop(cls): _macosx.show() def show(self): + if self.canvas.figure.stale: + self.canvas.draw_idle() if not self._shown: self._show() self._shown = True