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): """