From 72a6466cc9b67c0fd69901f2eab80640d30263ff Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Thu, 4 Mar 2021 00:23:39 +0100 Subject: [PATCH] Fix handling of warn keyword in in Figure.show. It was accidentally ignored since 154a616. --- lib/matplotlib/figure.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/matplotlib/figure.py b/lib/matplotlib/figure.py index fe98dd3f59a8..81b35ebfbfd1 100644 --- a/lib/matplotlib/figure.py +++ b/lib/matplotlib/figure.py @@ -2209,7 +2209,8 @@ def show(self, warn=True): try: self.canvas.manager.show() except NonGuiException as exc: - _api.warn_external(str(exc)) + if warn: + _api.warn_external(str(exc)) def get_axes(self): """