Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 33c3e72

Browse files
authored
Merge pull request #19632 from anntzer/sw
Fix handling of warn keyword in in Figure.show.
2 parents a3d30a3 + 72a6466 commit 33c3e72

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/figure.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2204,7 +2204,8 @@ def show(self, warn=True):
22042204
try:
22052205
self.canvas.manager.show()
22062206
except NonGuiException as exc:
2207-
_api.warn_external(str(exc))
2207+
if warn:
2208+
_api.warn_external(str(exc))
22082209

22092210
@property
22102211
def axes(self):

0 commit comments

Comments
 (0)