-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
max open warning #64
Comments
I'll bump this as well because this is one of a few irritating behaviors that need to be resolved. The cleanest way I've seen of dealing with this particular issue is something like this:
This way it always clears the previous named instance of the plot. The close command also does nothing on a first pass in which the figure is already closed. This also works with integers, though you run the risk of accidentally closing a different figure since matplotlib creates integer numbered figures by default. The downside is obviously that you have to uniquely name your figures. |
I think the underlying problem here is that with There needs to be some reference counting to tell when there are no visible figures left? |
If you know you will have plenty of ram, you can increase the number of figures before there's a warning: import matplotlib.pyplot as plt
plt.rcParams['figure.max_open_warning'] = 2000 # default is 20 |
The reason we have the warning in people were accumulating enough open figures to OOM their python process... |
Hi all, just checking if there are any updates on this. I'm a daily user, and I agree with Merlin that it is pretty irritating. |
Hi, I use ipympl in jupyterlab.
%matplotlib widget
opens a different figure for the same cell after each run. Soon I'll get this max open warning, which is kinda irritating.%matplotlib notebook
has no such issue. Is there a way to not open another figure in the same cell?(%matplotlib widget)
(%matplotlib notebook)
The text was updated successfully, but these errors were encountered: