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
From matplotlib/ipympl#405 it seems that if you repreatedly run a cell with plt.figure(num=1) and then plot a new line you will only ever have a plot with one line on it.
That seems like the expected and desired behaviour to me. For a notebook, you definitely don't want the result to depend on how many times you ran a cell.
plt.figure(num=1) makes the figure with num=1 active. Re-running the cell first clears its outputs, which closes the figure. Thus, there is no figure with num=1 and a new one is created.
So I think I agree with @jklymak that this is expected and intended.
Bug summary
From matplotlib/ipympl#405 it seems that if you repreatedly run a cell with
plt.figure(num=1)
and then plot a new line you will only ever have a plot with one line on it.Code for reproduction
Cell 1
Cell 2 (run this one repeatedly)
Actual outcome
Expected outcome
Do the equivalent from ipython:
Additional information
No response
Operating system
No response
Matplotlib Version
3.5.1
Matplotlib Backend
nbagg
Python version
3.9.7
Jupyter version
6.4.4
Installation
pip
The text was updated successfully, but these errors were encountered: