Open pulkin opened 4 years ago
If in the next cell you do fig.canvas
and let jupyter repr that do you get a live figure? My suspicion is that some part of the ipywidgets setup that links the JS to the kernel is set up as part of the code that is run by jupyter when a cell is done successfully and not done as part of the code that runs when a cell fails.
If in the next cell you do fig.canvas and let jupyter repr that do you get a live figure?
fig.canvas
in the subsequent cell renders exactly as the above.
I think this mostly on the widget side of the house, moved to ipympl.
Do you get an error in the JavaScript console? https://webmasters.stackexchange.com/questions/8525/how-do-i-open-the-javascript-console-in-different-browsers
There is nothing I could associate with the issue. Also, nothing is output when I try to reproduce the issue by pressing ctrl-enter.
Another connected outcome of this issue: When restarting and running a longer notebook from top to bottom all figures do not show up if the execution ends with an exception:
This means you have to manually executes cells step by step so that you never run a cell together with another cell that raises an exception later.
This happens reproducibly here with the current ipympl 0.5.6 but also with earlier versions.
Bug report
Bug summary
Matplotlib widget occasionally fails to render.
Code for reproduction
Actual outcome
Expected outcome
Two empty subplots.
Matplotlib version
print(matplotlib.get_backend())
): module://ipympl.backend_nbagg