You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
When I use plot to draw efficient frontier and covariance charts and set a file name to save the results, after saving some images it raises this warning.
I try to correct this by adding the line
plt.cla()
after the
plt.savefig(fname=filename, dpi=dpi)
but it does'nt work.
Also I try to close the plt but could not.
Screenshots
/lib/python3.7/site-packages/pyportfolioopt-1.2.2-py3.7.egg/pypfopt/plotting.py:144: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (matplotlib.pyplot.figure) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam figure.max_open_warning).
Thanx for your help
Best Regards
Barmak
The text was updated successfully, but these errors were encountered:
Thank you.
I try that before and it works. But in case of using with simultaneous user it may cause problem.
I want to close only the plot handle of the current session user. But It could be ignore.
Many thanks
& Regards
Barmak
Hi,
When I use plot to draw efficient frontier and covariance charts and set a file name to save the results, after saving some images it raises this warning.
I try to correct this by adding the line
plt.cla()
after the
plt.savefig(fname=filename, dpi=dpi)
but it does'nt work.
Also I try to close the plt but could not.
Screenshots
/lib/python3.7/site-packages/pyportfolioopt-1.2.2-py3.7.egg/pypfopt/plotting.py:144: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (
matplotlib.pyplot.figure
) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParamfigure.max_open_warning
).Thanx for your help
Best Regards
Barmak
The text was updated successfully, but these errors were encountered: