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

Skip to content

Commit 1bac3b3

Browse files
authored
Merge pull request #23507 from mackopes/main
Add hint when More than {max_open_warning} figures have been opened
2 parents 64b1992 + 8c49928 commit 1bac3b3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/pyplot.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,8 @@ def figure(num=None, # autoincrement if None, else integer from 1-N
815815
f"Figures created through the pyplot interface "
816816
f"(`matplotlib.pyplot.figure`) are retained until explicitly "
817817
f"closed and may consume too much memory. (To control this "
818-
f"warning, see the rcParam `figure.max_open_warning`).",
818+
f"warning, see the rcParam `figure.max_open_warning`). "
819+
f"Consider using `matplotlib.pyplot.close()`.",
819820
RuntimeWarning)
820821

821822
manager = new_figure_manager(

0 commit comments

Comments
 (0)