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

Skip to content

Commit 71a54ac

Browse files
authored
Merge pull request #16314 from anntzer/maxopen
Avoid repeatedly warning about too many figures open.
2 parents 8d43b00 + fa53aa3 commit 71a54ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/pyplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ def figure(num=None, # autoincrement if None, else integer from 1-N
503503
if figManager is None:
504504
max_open_warning = rcParams['figure.max_open_warning']
505505

506-
if len(allnums) >= max_open_warning >= 1:
506+
if len(allnums) == max_open_warning >= 1:
507507
cbook._warn_external(
508508
"More than %d figures have been opened. Figures "
509509
"created through the pyplot interface "

0 commit comments

Comments
 (0)